<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2722" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=781524821-24082005>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.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=781524821-24082005>The problem is that
I'm getting two polygons (zip codes) returned when I should be getting
one:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=781524821-24082005>SELECT zip FROM
zipcodes WHERE POINT '(-121.447,38.570264)' @ the_geom; - Returns two zip
codes, 95816 and 95819</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005>However</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=781524821-24082005>(a 0.001 longitude
change to the east)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=781524821-24082005>SELECT zip FROM
zipcodes WHERE POINT '(-121.446,38.570264)' @ the_geom; - Returns zip code 95819
properly</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=781524821-24082005>Both points are in
95819 and are near the border of 95816.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=781524821-24082005>Any idea why the
first query is returning both 95816 and 95819 -- the point should only be found
in 95819.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=781524821-24082005>Thanks!</SPAN></FONT></DIV>
<DIV align=left><FONT face=Arial><FONT size=2><SPAN
class=781524821-24082005>-</SPAN>Matt</FONT></FONT></DIV></BODY></HTML>