[postgis-users] Lat/Long,geometry and buffer
Santosh Gaikwad
Santosh.Gaikwad at saama.com
Wed Jul 4 04:20:18 PDT 2007
Hi,
I have US address which have been geocoded to get latitude and
longitude.
I am following the below steps
1. Add column
SELECT AddGeometryColumn( 'public', 'california', 'the_geom', 4326,
'POINT', 2 );
2. Populate geometry
UPDATE california
SET the_geom = PointFromText('POINT(' || longitude || ' ' ||
latitude || ')',4326)
3. Spatial query (I would like to build the spatial query for listing
out the locations for a given radius of 100 meters from a particular
location.)
Select *
from california
where setSRID(
buffer(
transform(GeomFromText('POINT(-121.962459
37.388364)',4326),2163),
100
),
2163)&& transform(the_geom, 2163)
This returns back me the locations with specified 100 meters radius.
This seems to be working fine but I am not confidant about it. When I
checked out SRID 2163 in spatial_ref_sys table, it says that the
projection is US national atlas equal area and unit is meters. I would
like to know whether this projection covers whole USA satisfactorily or
not. When I am using openjump by bringing postgis data into it, I can
not see the distance in meters on map. Why it is so? Thus this means
SRID 2163 has been used only to transform the projection.
Next I want to work on whole USA data. Please kindly let me know whether
I am following the correct steps or not?
Santosh Gaikwad
Senior Software Developer
Saama Technologies (India) Pvt Ltd.
6th Floor West Wing, Marisoft III,
Marigold Premises, Kalayani Nagar,
Pune - 411014. India
Phone : +91 20 66071319 Extn: 397
Mobile: +91-9422005927
E-mail :Santosh.Gaikwad at saama.com
http://www.saama.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070704/5f1d723a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Santosh Gaikwad.vcf
Type: text/x-vcard
Size: 145 bytes
Desc: Santosh Gaikwad.vcf
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070704/5f1d723a/attachment.vcf>
More information about the postgis-users
mailing list