[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] Round up coordinates?
From: Nicklas_Avén <nicklas.aven () jordogskog ! no>
Date: 2010-06-24 7:19:36
Message-ID: 201006240719.o5O7JasJ002893 () mail-core ! space2u ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hallo
The problem is that even if you round your coordinates with ST_SnapToGrid, the edges \
between the vertexes will cross "not rounded land". So the intersection will most \
likely fail without the buffer if the intersection is expected somewhere between the \
rounded vertex points.
Another way of doing it is using ST_DWithin instead. I don't know which one is most \
effective.
Hope That Helps
Nicklas
2010-06-23 Joćo Paulo Hespanha wrote:
I have a number of cadastral boundaries (in predio_polylines) and
> property beacons (in propertybeacon) in a PostGIS database. The
> coordinates have a non-default srid of 9102160 and are stored with
> double precision.
> When I run the following topological query (boundaries crossing a
> certain beacon) without the buffer, I get no results. The data has an
> internal resolution of 0.01 meter (from original source) and quality no
> better than 0.1 meter. How can I round up the coordinates such that the
> query can run without the buffer?
>
> BTW, is it possible to build a small graphical form to run the querying,
> changing the b.gid parameter? (in uDIG? :-)
>
>
> Topo query:
> select
> l.gid,
> l.nfolhapred,
> b.gid,
> b.tipo
> from
> predio_polylines as l,
> propertybeacon as b
> where
> b.gid = 1000 AND
> (ST_Intersects(ST_Buffer(ST_EndPoint(l.the_geom), 0.01),
> ST_Buffer(b.the_geom, 0.01)) OR
> ST_Intersects(ST_Buffer(ST_StartPoint(l.the_geom), 0.01),
> ST_Buffer(b.the_geom, 0.01)));
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
[Attachment #5 (unknown)]
<html>
<head>
</head>
<body>Hallo<br />
<br />
The problem is that even if you round your coordinates with ST_SnapToGrid, the edges \
between the vertexes will cross "not rounded land". So the intersection will most \
likely fail without the buffer if the intersection is expected somewhere between the \
rounded vertex points.<br /> <br />
Another way of doing it is using ST_DWithin instead. I don't know which one is most \
effective.<br /> <br />
Hope That Helps<br />
Nicklas<br />
<br />
<br />
2010-06-23 Joćo Paulo Hespanha wrote:<br />
<br />
I have a number of cadastral boundaries (in predio_polylines) and<br />
> property beacons (in propertybeacon) in a PostGIS database. The<br />
> coordinates have a non-default srid of 9102160 and are stored with<br />
> double precision. <br />
> When I run the following topological query (boundaries crossing a<br />
> certain beacon) without the buffer, I get no results. The data has an<br />
> internal resolution of 0.01 meter (from original source) and quality no<br />
> better than 0.1 meter. How can I round up the coordinates such that the<br />
> query can run without the buffer?<br />
> <br />
> BTW, is it possible to build a small graphical form to run the querying,<br />
> changing the b.gid parameter? (in uDIG? :-)<br />
> <br />
> <br />
> Topo query:<br />
> select<br />
> l.gid,<br />
> l.nfolhapred,<br />
> b.gid,<br />
> b.tipo<br />
> from<br />
> predio_polylines as l,<br />
> propertybeacon as b<br />
> where<br />
> b.gid = 1000 AND<br />
> (ST_Intersects(ST_Buffer(ST_EndPoint(l.the_geom), 0.01),<br />
> ST_Buffer(b.the_geom, 0.01)) OR<br />
> ST_Intersects(ST_Buffer(ST_StartPoint(l.the_geom), 0.01),<br />
> ST_Buffer(b.the_geom, 0.01)));<br />
> <br />
> <br />
> _______________________________________________<br />
> postgis-users mailing list<br />
> postgis-users@postgis.refractions.net<br />
> http://postgis.refractions.net/mailman/listinfo/postgis-users<br />
> <br />
>
</body>
</html>
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic