I have table with latitude & longitude columns in SQL. how can I select all records with lat-long 60 degree North or greater (Arctic Region)
2 Answers
how about:
select * from table where latitude > 60.0;
-
-
1
One thing to consider is that if you have a large dataset then defining your data using lat / long, instead of using a real GIS geometry like PostGIS geography or geometry, prevents you from building spatial indexes on your data. You could get by with building a B+-tree index on your latitude field for the query iant provided, but the moment you need to start doing queries involving both longitude and latitude your indexes will perform sub-par (even if you have two separate indexes on both lat and lon).