Opened 15 years ago

Closed 15 years ago

#246 closed defect (worksforme)

Platform differences when performing a union

Reported by: lighthousej Owned by: pramsey
Priority: medium Milestone: PostGIS 1.4.1
Component: postgis Version: 1.4.X
Keywords: Cc:

Description

Attached are two psql sessions, one on a WinXP Pro SP3 machine, another to Ubuntu Hardy 8.04. (one pair of files have unix line endings, another has DOS line endings, for your convenience).

There are 18 polygons in the data set and I want to make a union out of them. The union works in Linux but fails with an exception in Windows.

I received an error on the Windows box (TopologyException: found non-noded intersection …), then brought the data over to the linux box for analysis, and curiously the operation worked.

If you visualize it, I think the last polygon (#18) shares a common line segment in space with another (possibly #15), but breaks where #18 has a vertex on the line of #15. However there are at least 2 polygons that cover the same point in space so the point shouldn't even be a problem because it's not on the outside of the resulting shape.

I'm sure my analysis is lacking, but wanted to communicate all I found out. Using an alternate strategy of linework does get the union shape though.

Diagnostic information on Windows: postgres=# select postgis_full_version();

postgis_full_version


POSTGIS="1.4.0" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS

(1 row)

postgres=# select version();

version


PostgreSQL 8.4.0, compiled by Visual C++ build 1400, 32-bit

(1 row)

For Linux:

postgres=# select postgis_full_version();

postgis_full_version


POSTGIS="1.4.0" GEOS="3.1.1-CAPI-1.6.0" PROJ="Rel. 4.6.1, 21 August 2008" USE_STATS

(1 row)

postgres=# select version();

version


PostgreSQL 8.4.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10), 32-bit

(1 row)

Both were installed via binary setup programs.

Attachments (1)

postgres_sessions.zip (9.3 KB ) - added by lighthousej 15 years ago.
two psql sessions on each machine type demonstrating the difference

Download all attachments as: .zip

Change History (5)

by lighthousej, 15 years ago

Attachment: postgres_sessions.zip added

two psql sessions on each machine type demonstrating the difference

comment:1 by robe, 15 years ago

Milestone: postgis 1.5.0postgis 1.4.1

Can you try the GEOS 3.2SVN packaged in the Windows experimental (PostGIS 1.5SVN build). You just need to replace the 2 geos binary files. It should work just fine with your current PostGIS 1.4

http://postgis.refractions.net/download/windows/experimental.php

It could have been an issue that affected windows but not Linux because of some rounding differences. Others who have tried the GEOS 3.2SVN build for windows have had good success with these topological exception cases where the geometries are valid.

comment:2 by lighthousej, 15 years ago

Resolution: worksforme
Status: newclosed

ah, I decompressed the libgeos_c-1.dll and libgeos_3-2-0.dll (assuming those are the two binary files you meant) and it worked fine. It matched the output from the linux run. good call.

I'll try to remember trying out the beta/unrelease versions next time.

I won't change the resolution in case you have people set aside to do that.

comment:3 by lighthousej, 15 years ago

Resolution: worksforme
Status: closedreopened

oops, not used to this bug tracking system. re-opening in case whomever wants to properly resolve the bug your way.

comment:4 by robe, 15 years ago

Resolution: worksforme
Status: reopenedclosed
Note: See TracTickets for help on using tickets.