Re: [postgis-users] Need help on basic concepts, I just need really simple calculations

2015-03-22 Thread Aaron Lewis
Thanks Brent, I think I understand GIS a little bit now ... Just two more questions, 1. When looking for points within a circle, is this the recommended way? Which is, Storing data in `location geometry(point, 4326)` , convert it to geography then do the calculation 2. I tried to create

[postgis-users] Need help on basic concepts, I just need really simple calculations

2015-03-22 Thread Aaron Lewis
Hi, I've been searching online for days. Trying to understand why SRID is required. So I picked some random value. Now I'm need to retrieve POINTs within a circle range, e.g a circle at (146.0, 138.19) with radius of 100 meters: SELECT * FROM users WHERE ST_DWithin (users.location,

Re: [postgis-users] Need help on basic concepts, I just need really simple calculations

2015-03-22 Thread Nicolas Ribot
Hi Aaron, SRID is used to set a consistent coordinate system to the data. It refers to an EPSG Coordinate Reference System (CRS). For instance, EPSG:2600: ( http://spatialreference.org/ref/epsg/2600/) is a metric CRS. Coordinates (146.0, 138.19) are not valid in SRID 2600 (nor in lat/long

Re: [postgis-users] Need help on basic concepts, I just need really simple calculations

2015-03-22 Thread RĂ©mi Cura
Hey, I would sugger to read a little bit about geographical information https://en.wikipedia.org/wiki/Spatial_reference_system before using PostGIS. The unit depend on the way you measure, which depends on the Spatial Reference System. If you want it is a bit like measuring the temperature in

Re: [postgis-users] Need help on basic concepts, I just need really simple calculations

2015-03-22 Thread Brent Wood
Hi Aaron, Hopefully this (simplistic) description helps. Setting a SRID value for a feature tells Postgis what coordinate reference system (CRS) the coordinates are in. This includes the unit, which can be any linear unit of measurement, such as degrees (measured at the surface of the earth),

Re: [postgis-users] Need help on basic concepts, I just need really simple calculations

2015-03-22 Thread Brent Wood
In terms of the efficiencies underlying the query - I don't know enough to advise you. there are a few ways to phrase such a query, I don't know the advantages/disadvantages. My guess is that using 2D geometrires will be faster than 3D geographies - but the casting of lon/lat coord geometries