1

I am using the command line of spatiallite.exe version 4.2.0 and have a datatable that I have imported with latitude and longitude in WGS84. The data are more or less the following:

[Study_ID]      [StationNumber]     [Latitude]      [Longitude]  
"2016SWSamp "   "SJSW001"           "-95.08945"     "29.79917"

My SQL I am running in spatial lite is

select 
Study_ID,
StationNumber,
'SW Sampling' as location_purpose,
st_geomfromtext('POINT('||Longitude||' '||Latitude||')',4326)

and it returning all nulls for the geomfromtext function. I've tried changing case, using just geomfromtext which I've seen in other places, all to no avail.

Anyone see what I am doing wrong?

Thanks, SA

Ilya Chumakov
  • 23,161
  • 9
  • 86
  • 114
Sanjay Advani
  • 103
  • 1
  • 6
  • thanks for the edit.... – Sanjay Advani May 02 '16 at 16:39
  • `geomfromtext` returns `null` if any of the parameters are `null`. Is that your full query? Have you tried doing `select Longitude, Latitude, st_geomfromtext('POINT('||Longitude||' '||Latitude||')',4326)` to ensure that your `Latitude` and `Longitude` are not null? – antonio May 04 '16 at 15:51

0 Answers0