[postgis-users] Query postGIS (ArcGIS shapefile) based on lat/lonposition

Jean David TECHER davidtecher at yahoo.fr
Tue Jun 14 05:25:45 PDT 2005


Query postGIS (ArcGIS shapefile) based on lat/lon positionHi Greene

What kind of geometries do U have?

select geometrytype(the_geom) from yourtable

perhaps U should use x() and y() 

example

select x('point(5 10)'::geometry)

returns 5

and 

select y('point(5 10)'::geometry)

returns 10
---------------------------------------------------------------
TECHER Jean David
01MAP
e-mail: david at 01map.net
Tél: 04 67 45 60 27
Entreprise: http://www.01map.net
Perso: http://techer.pascal.free.fr/postgis/
---------------------------------------------------------------
  ----- Original Message ----- 
  From: Greene, Courtney 
  To: 'postgis-users at postgis.refractions.net' 
  Sent: Tuesday, June 14, 2005 1:39 PM
  Subject: [postgis-users] Query postGIS (ArcGIS shapefile) based on lat/lonposition


  Hi, 
  I'm a new user of postgres/postGIS, (Win2000, postgres 8.0.3, postGIS 9.0.1) but I have managed to load the contents of an ArcGIS shapefile into postGIS and I'm able to query and retrieve records based on the table contents. 

  What I'm struggling with is trying to formulate and execute a query based on a latitude/longitude position. I want to query and retrieve the one record that describes the shape that is positioned over a specific lat/lon position and I just don't know how to work with a lat/long position and the positions as described in the shape file. Can any one offer any suggestions as to how I can do this or where I may look for answers?

  I appreciate any guidance that may be offered. 

  Thanks, 
  Courtney 

  Courtney Greene 
  Defence R&D Canada - Atlantic 
  Integrated Signatures Management 
  9 Grove Street (PO Box 1012) 
  Dartmouth, Nova Scotia 
  Tel: 902-426-3100, Ext. 258 
  Email: Courtney.Greene at drdc-rddc.gc.ca 





------------------------------------------------------------------------------


  _______________________________________________
  postgis-users mailing list
  postgis-users at postgis.refractions.net
  http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050614/e89882bf/attachment.html>


More information about the postgis-users mailing list