[postgis-users] WHERE POINT @ the_geom; returning two polygons/zip codes instead of one

Matt Farley mfarley at sac-yolomvcd.com
Wed Aug 24 14:53:08 PDT 2005


I recently imported a ZipCodes shape file (local Sacramento/Yolo county zip codes) into our PostGIS database.  I'm seeing a weird anomaly when selecting a point @ geom to determine which zip code the point resides in.

The problem is that I'm getting two polygons (zip codes) returned when I should be getting one:

SELECT zip FROM zipcodes WHERE POINT '(-121.447,38.570264)' @ the_geom;  - Returns two zip codes, 95816 and 95819

However
(a 0.001 longitude change to the east)
SELECT zip FROM zipcodes WHERE POINT '(-121.446,38.570264)' @ the_geom; - Returns zip code 95819 properly

Both points are in 95819 and are near the border of 95816.

Any idea why the first query is returning both 95816 and 95819 -- the point should only be found in 95819.

Thanks!
-Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050824/bdf8fd1d/attachment.html>


More information about the postgis-users mailing list