[postgis-users] Identity Overlay
Stephen Woodbridge
woodbri at swoodbridge.com
Wed Nov 22 11:55:08 PST 2006
Try:
UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE
polygon_layer.the_geom && point_layer.the_geom and
distance(polygon_layer.the_geom, point_layer.the_geom) < 0.00001;
It is not good to compare floats with equals due to possible rounding
errors.
-Steve
Aaron Koning wrote:
> Hi All,
>
> I am trying to perform an identity overlay where each point in a point
> layer gets a value from a polygon layer based on what polygon contains
> the point. I have come up with the following query which is working
> fairly well.
> UPDATE point_layer SET b250k_tag = polygon_layer.b250k_tag WHERE
> contains(polygon_layer.the_geom, point_layer.the_geom);
>
> I am just wondering if other people have performed identity like
> overlays in PostGIS and is there a better / more efficient way to
> perform them?
>
> Thanks,
> Aaron
>
> +-------------------------------------------------
> | Aaron Koning
> | Information Technologist
> | Prince George, BC, Canada.
> +-------------------------------------------------
> | Flexible Internet Spatial Template:
> | http://fist-mapping.org
> +-------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list