[postgis-users] Newbie Question

Pedro Doria Meunier pdoria at netmadeira.com
Tue Aug 5 12:45:01 PDT 2008

Hi Adam,
This is what I use when I want to see which map to use for a vehicle's
current position:

SELECT myfield1 FROM maps AS m 
WHERE m.b_box && geomfromtext('POINT(-16.3 32.7)',4326) LIMIT 1

(Note: there might be a newer/better function in PostGIS 1.3 ... )

The top-level maps table consists of polygons defining countries
This query returns the correspondent map for the given location so this
should be applicable for your perimeters, which I guess are polygons :)

Pedro Doria Meunier

On Tue, 2008-08-05 at 14:24 -0500, Adam Vande More wrote:
> Hello,
> Perhaps my questions were addressed earlier or in some documentation I 
> missed. If so, I apologize in advance as I am completely new to GIS and 
> PostGIS.  Judging from the documentation I have read, my needs are 
> extremely simple vs PostGIS capabilities however I am unsure if the 
> functionality of what I want actually exists.
> I deal with areas in the US, territories that are regional in nature but 
> not bounded by common things eg state lines, water ways, counties, etc.  
> They are irregular shapes of varying land area.  I also have sets of 
> latitude and longitude points.  I would like some type of system where I 
> enter in a perimeter of  territories, and find out whether a particular 
> latitude and longitude point lies within that perimeter. 
> My understanding of this is that I would need to either manually create 
> a GML type file with the perimeters in it, or use some type of map 
> authoring software to accomplish this goal.  Are my understandings 
> correct and if so is there a recommendation for a particular piece of 
> software which can fulfill this?
> Also, are the libraries/functions available for determining whether a 
> point is in a perimeter?
> Much appreciated,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080805/356f2fed/attachment.pgp>

More information about the postgis-users mailing list