I forgot about the float comparison, so thanks for that pointer.<br><br>Great to hear that PIP will be built in. Currently, with a million and half points it can take a while, but the end result is great!<br><br>Aaron<br><br>
<div><span class="gmail_quote">On 11/22/06, <b class="gmail_sendername">Paul Ramsey</b> <<a href="mailto:pramsey@refractions.net">pramsey@refractions.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is such a common performance case, we're going to add some<br>automagical code to make Contains() work more efficiently, by<br>short-circuiting and Contains(POLYGON, POINT) cases directly to an<br>internal postgis PIP algorithm.
<br><br>P<br><br>Stephen Woodbridge wrote:<br>> Try:<br>><br>> UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE<br>> polygon_layer.the_geom && point_layer.the_geom and<br>> distance(polygon_layer.the_geom, point_layer.the_geom) <
0.00001;<br>><br>> It is not good to compare floats with equals due to possible rounding<br>> errors.<br>><br>> -Steve<br>><br>> Aaron Koning wrote:<br>>> Hi All,<br>>><br>>> I am trying to perform an identity overlay where each point in a point
<br>>> layer gets a value from a polygon layer based on what polygon contains<br>>> the point. I have come up with the following query which is working<br>>> fairly well.<br>>> UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE
<br>>> contains(polygon_layer.the_geom, point_layer.the_geom);<br>>><br>>> I am just wondering if other people have performed identity like<br>>> overlays in PostGIS and is there a better / more efficient way to
<br>>> perform them?<br>>><br>>> Thanks,<br>>> Aaron<br>>><br>>> +-------------------------------------------------<br>>> | Aaron Koning<br>>> | Information Technologist<br>
>> | Prince George, BC, Canada.<br>>> +-------------------------------------------------<br>>> | Flexible Internet Spatial Template:<br>>> | <a href="http://fist-mapping.org">http://fist-mapping.org
</a><br>>> +-------------------------------------------------<br>>><br>>><br>>> ------------------------------------------------------------------------<br>>><br>>> _______________________________________________
<br>>> postgis-users mailing list<br>>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>><br>> _______________________________________________<br>> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">
postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br><br>_______________________________________________
<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>+-------------------------------------------------<br>| Aaron Koning<br>| Information Technologist<br>| Prince George, BC, Canada.<br>+-------------------------------------------------
<br>| Flexible Internet Spatial Template:<br>| <a href="http://fist-mapping.org">http://fist-mapping.org</a><br>+-------------------------------------------------