[postgis-users] Intersection() throws error?
Martin Davis
mbdavis at VividSolutions.com
Fri Mar 11 08:42:33 PST 2005
The first polygon is not valid. It contains a self-intersection at the end of the narrow "tail" on the bottom left.
(If you want to see this, grab a copy of JUMP and use the validation tool to locate the error).
Martin Davis, Senior Technical Architect
Vivid Solutions Inc. www.vividsolutions.com
Suite #1A-2328 Government Street Victoria, B.C. V8T 5G5
Phone: (250) 385 6040 - Local 308 Fax: (250) 385 6046
> -----Original Message-----
> From: Hubert Fröhlich [mailto:hubert.froehlich at bvv.bayern.de]
> Sent: March 11, 2005 4:10 AM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] Intersection() throws error?
>
>
> Hi list,
>
> I am currently using PostgreSQL 8.0.0 final, GEOS 2.1.1 and Postgis
> 1.0.0 RC 1
>
> I want to check the correct neighborhood of land use parcels.
>
> I tried
>
> SELECT intersects ( 'MULTIPOLYGON(((4424942.57 5359069.45,4424953.01
> 5359069.19,4424969 5359068.79,4424984.98 5359068.39,4425000.97
> 5359067.99,4425016.95 5359067.58,4425032.94 5359067.18,4425048.92
> 5359066.78,4425058.49 5359066.54,4425078.28 5359067.74,4425086.75
> 5359067.58,4425097.49 5359067.38,4425099.91 5359067.68,4425101.89
> 5359068.48,4425103.54 5359069.77,4425104.7 5359071.42,4425104.9
> 5359073.06,4425106.4 5359072.35,4425106.69 5359051.7,4425104.75
> 5359051.62,4425104.66 5359054.77,4425104.1 5359056.28,4425101.86
> 5359057.96,4425099.19 5359058.5,4425086.71 5359058.82,4425068.4
> 5359059.29,4425050.09 5359059.75,4425031.78 5359060.22,4425013.46
> 5359060.68,4424995.15 5359061.15,4424976.84 5359061.61,4424953.66
> 5359062.2,4424942.04 5359062.49,4424942.03692
> 5359062.49009,4424941.70709 5359062.49184,4424941.37754
> 5359062.47806,4424941.04901 5359062.44877,4424940.72222
> 5359062.40403,4424940.3979 5359062.34395,4424940.07677
> 5359062.26866,4424939.75955 5359062.17832,4424939.44693
> 5359062.07315,4424939.13961 5359061.95336,4424938.83828
> 5359061.81923,4424938.5436 5359061.67105,4424938.25623
> 5359061.50916,4424937.9768 5359061.33391,4424937.70594
> 5359061.14569,4424937.44425 5359060.94492,4424937.1923
> 5359060.73204,4424937.19 5359060.73,4424937.18532
> 5359060.72574,4424936.94678 5359060.49794,4424936.71924
> 5359060.25916,4424936.5032 5359060.00992,4424936.29914
> 5359059.75078,4424936.10752 5359059.48232,4424935.92875
> 5359059.20513,4424935.76324 5359058.91983,4424935.61135
> 5359058.62704,4424935.47342 5359058.32743,4424935.34976
> 5359058.02165,4424935.24064 5359057.71039,4424935.14631
> 5359057.39433,4424935.06697 5359057.07418,4424935.00279
> 5359056.75064,4424934.95393 5359056.42445,4424934.92049
> 5359056.09631,4424934.92 5359056.09,4424936.52 5359076.19,4424937.15
> 5359072.9,4424939.37 5359070.43,4424942.57 5359069.45)))',
> 'MULTIPOLYGON(((4424933.2 5359035.11,4424934.92
> 5359056.09,4424934.92049
> 5359056.09631,4424934.95393 5359056.42445,4424935.00279
> 5359056.75064,4424935.06697 5359057.07418,4424935.14631
> 5359057.39433,4424935.24064 5359057.71039,4424935.34976
> 5359058.02165,4424935.47342 5359058.32743,4424935.61135
> 5359058.62704,4424935.76324 5359058.91983,4424935.92875
> 5359059.20513,4424936.10752 5359059.48232,4424936.29914
> 5359059.75078,4424936.5032 5359060.00992,4424936.71924
> 5359060.25916,4424936.94678 5359060.49794,4424937.18532
> 5359060.72574,4424937.19 5359060.73,4424937.1923
> 5359060.73204,4424937.44425 5359060.94492,4424937.70594
> 5359061.14569,4424937.9768 5359061.33391,4424938.25623
> 5359061.50916,4424938.5436 5359061.67105,4424938.83828
> 5359061.81923,4424939.13961 5359061.95336,4424939.44693
> 5359062.07315,4424939.75955 5359062.17832,4424940.07677
> 5359062.26866,4424940.3979 5359062.34395,4424940.72222
> 5359062.40403,4424941.04901 5359062.44877,4424941.37754
> 5359062.47806,4424941.70709 5359062.49184,4424942.03692
> 5359062.49009,4424942.04 5359062.49,4424953.66 5359062.2,4424952.87
> 5359031.74,4424948.16 5359031.86,4424948.26 5359034.7,4424933.2
> 5359035.11)))' );
> intersects
> ------------
> t
> (1 row)
>
> so far ok but when using the same polygons to get the true
> intersection
>
> SELECT astext(intersection( 'MULTIPOLYGON(((4424942.57
> 5359069.45,4424953.01 5359069.19,4424969 5359068.79,4424984.98
> 5359068.39,4425000.97 5359067.99,4425016.95 5359067.58,4425032.94
> 5359067.18,4425048.92 5359066.78,4425058.49 5359066.54,4425078.28
> 5359067.74,4425086.75 5359067.58,4425097.49 5359067.38,4425099.91
> 5359067.68,4425101.89 5359068.48,4425103.54 5359069.77,4425104.7
> 5359071.42,4425104.9 5359073.06,4425106.4 5359072.35,4425106.69
> 5359051.7,4425104.75 5359051.62,4425104.66 5359054.77,4425104.1
> 5359056.28,4425101.86 5359057.96,4425099.19 5359058.5,4425086.71
> 5359058.82,4425068.4 5359059.29,4425050.09 5359059.75,4425031.78
> 5359060.22,4425013.46 5359060.68,4424995.15 5359061.15,4424976.84
> 5359061.61,4424953.66 5359062.2,4424942.04 5359062.49,4424942.03692
> 5359062.49009,4424941.70709 5359062.49184,4424941.37754
> 5359062.47806,4424941.04901 5359062.44877,4424940.72222
> 5359062.40403,4424940.3979 5359062.34395,4424940.07677
> 5359062.26866,4424939.75955 5359062.17832,4424939.44693
> 5359062.07315,4424939.13961 5359061.95336,4424938.83828
> 5359061.81923,4424938.5436 5359061.67105,4424938.25623
> 5359061.50916,4424937.9768 5359061.33391,4424937.70594
> 5359061.14569,4424937.44425 5359060.94492,4424937.1923
> 5359060.73204,4424937.19 5359060.73,4424937.18532
> 5359060.72574,4424936.94678 5359060.49794,4424936.71924
> 5359060.25916,4424936.5032 5359060.00992,4424936.29914
> 5359059.75078,4424936.10752 5359059.48232,4424935.92875
> 5359059.20513,4424935.76324 5359058.91983,4424935.61135
> 5359058.62704,4424935.47342 5359058.32743,4424935.34976
> 5359058.02165,4424935.24064 5359057.71039,4424935.14631
> 5359057.39433,4424935.06697 5359057.07418,4424935.00279
> 5359056.75064,4424934.95393 5359056.42445,4424934.92049
> 5359056.09631,4424934.92 5359056.09,4424936.52 5359076.19,4424937.15
> 5359072.9,4424939.37 5359070.43,4424942.57 5359069.45)))',
> 'MULTIPOLYGON(((4424933.2 5359035.11,4424934.92
> 5359056.09,4424934.92049
> 5359056.09631,4424934.95393 5359056.42445,4424935.00279
> 5359056.75064,4424935.06697 5359057.07418,4424935.14631
> 5359057.39433,4424935.24064 5359057.71039,4424935.34976
> 5359058.02165,4424935.47342 5359058.32743,4424935.61135
> 5359058.62704,4424935.76324 5359058.91983,4424935.92875
> 5359059.20513,4424936.10752 5359059.48232,4424936.29914
> 5359059.75078,4424936.5032 5359060.00992,4424936.71924
> 5359060.25916,4424936.94678 5359060.49794,4424937.18532
> 5359060.72574,4424937.19 5359060.73,4424937.1923
> 5359060.73204,4424937.44425 5359060.94492,4424937.70594
> 5359061.14569,4424937.9768 5359061.33391,4424938.25623
> 5359061.50916,4424938.5436 5359061.67105,4424938.83828
> 5359061.81923,4424939.13961 5359061.95336,4424939.44693
> 5359062.07315,4424939.75955 5359062.17832,4424940.07677
> 5359062.26866,4424940.3979 5359062.34395,4424940.72222
> 5359062.40403,4424941.04901 5359062.44877,4424941.37754
> 5359062.47806,4424941.70709 5359062.49184,4424942.03692
> 5359062.49009,4424942.04 5359062.49,4424953.66 5359062.2,4424952.87
> 5359031.74,4424948.16 5359031.86,4424948.26 5359034.7,4424933.2
> 5359035.11)))' ) );
> NOTICE: AssertionFailedException: EdgeRing::computePoints:
> found null
> Directed Edge
> ERROR: GEOS Intersection() threw an error!
>
>
> What has gone wrong?
>
> Sorry for the long and complicated polygons; they have been converted
> from multi-"polygons" containing not only straight lines but also
> circular arcs (This holds especially for the parts with four or five
> decimal digits.)
>
>
> Greetings,
>
> Hubert
> --
> --------------------------------------------------------------
> -----------------
> Dr.-Ing. Hubert Fröhlich
> Bezirksfinanzdirektion München
> Alexandrastr. 3, D-80538 München, GERMANY
> Tel. :+49 (0)89 / 2190 - 2980
> Fax :+49 (0)89 / 2190 - 2997
> hubert dot froehlich at bvv dot bayern dot de
> _______________________________________________
> 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