[postgis-users] Identity Overlay
Aaron Koning
aaronkoning at gmail.com
Wed Nov 22 13:10:59 PST 2006
I forgot about the float comparison, so thanks for that pointer.
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!
Aaron
On 11/22/06, Paul Ramsey <pramsey at refractions.net> wrote:
>
> This is such a common performance case, we're going to add some
> automagical code to make Contains() work more efficiently, by
> short-circuiting and Contains(POLYGON, POINT) cases directly to an
> internal postgis PIP algorithm.
>
> P
>
> Stephen Woodbridge wrote:
> > 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
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
--
+-------------------------------------------------
| Aaron Koning
| Information Technologist
| Prince George, BC, Canada.
+-------------------------------------------------
| Flexible Internet Spatial Template:
| http://fist-mapping.org
+-------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20061122/1d6734c0/attachment.html>
More information about the postgis-users
mailing list