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

2015-03-23 Thread David Fawcett
hy, 100); > > (I haven't tested it, but I think this should work) > > Cheers > > Bent Wood > > -------------- > *From:* Aaron Lewis > *To:* postgis-users@lists.osgeo.org > *Sent:* Monday, March 23, 2015 12:09 AM > *Subject:* [postgis-use

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

2015-03-22 Thread Brent Wood
ip st where st.stratum_key = m.stratum_key and s.stratum=st.stratum and st.trip_code = t.trip_code and s.trip_code=t.trip_code order by trip_code, stratum; From: Aaron Lewis To: Brent Wood Cc: PostGIS Users Discussion Sent: Monday, March 23, 2015 2:19 PM Subject: Re: [postgis-users] Need help

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

2015-03-22 Thread Aaron Lewis
users > WHERE ST_DWithin (ST_Transform(users.location,4326)::geography, > st_setsrid(st_makepoint (146.0, > 138.19), 4326)::geography, 100); > > (I haven't tested it, but I think this should work) > > Cheers > > Bent Wood > > > Fr

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

2015-03-22 Thread Brent Wood
326)::geography, 100); (I haven't tested it, but I think this should work) Cheers Bent Wood From: Aaron Lewis To: postgis-users@lists.osgeo.org Sent: Monday, March 23, 2015 12:09 AM Subject: [postgis-users] Need help on basic concepts, I just need really simple calculations Hi,

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 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 Ce

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

2015-03-22 Thread Aaron Lewis
Thanks Nicolas, I take a few tries, but it looks like ST_DWithin & ST_Distance all deals in degrees, not meters ..: gis=# select nick, ST_AsText(location), ST_Distance(location, st_setsrid(st_makepoint (46.3, 36.10), 2600)) from users where ST_DWithin(users.location, st_setsrid(st_makepoint (46.3

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 coordin

[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, st_setsrid(st