18 reputation
2
bio website cbpowell.wordpress.com
location Seattle, WA
age 44
visits member for 1 year, 10 months
seen Dec 7 '13 at 18:01

Feb
27
awarded  Scholar
Feb
27
accepted Given a lat/long point, determine if it's land or water?
Feb
27
comment Given a lat/long point, determine if it's land or water?
Thanks - that SRID change is good advice. I've discovered through experimentation that your SQL correctly differentiates land/no-land for unconverted 4326 data (in other words, the stock data as delivered from Natural Earth). The SQL fails strictly for the (0,0) position on converted data. I haven't the foggiest why. But a yard away to (1,1) and your SQL succeeds. I think I'll call that adequate. Accepting your answer, thank you very much for your help.
Feb
27
comment Given a lat/long point, determine if it's land or water?
@mapperz - the ne_10m_land table that I'm using is Multipolygon. @tomfumb - Sorry, the simple use-case doesn't capture the whole task; suffice it to say that I want the server to make the determination, in order to prevent 'cheating' from the client end. I hope that the GIS data will permit quick & definitive land/no-land determination server-side.
Feb
27
comment Given a lat/long point, determine if it's land or water?
This SQL comes very close but I suspect something is not quite right; the fault may be my interpretation. When slightly modified as follows to use 900913 to avoid the different SRIDs error: select (count(*) >0) as isLand from "ne_10m_land" where ST_Intersects(ST_SetSRID(ST_MakePoint(0, 0), 900913), the_geom); ...the result is true. This seems peculiar, as point 0/0 is in the ocean off the coast of Africa.
Feb
27
awarded  Student
Feb
26
asked Given a lat/long point, determine if it's land or water?