[postgis-users] valid MULTIPOLYGONs and order of vertices?

Hubert Fröhlich hubert.froehlich at bvv.bayern.de
Tue Apr 26 04:13:22 PDT 2005


Hi list,
I am using Postgres 8.0.0, Postgis 1.0.0 RC1 and geos 2.1.1 under SuSE
Linux 9.2.


Say I have a polygon like



  select isValid('MULTIPOLYGON(((4457484.31 5403325.86, 4457473.8 
5403324.77, 4457473.29 5403329.76, 4457472.55 5403330.04, 4457471.9 
5403330.68, 4457471.64 5403331.45, 4457471.26 5403335.14, 4457471.42 
5403335.87, 4457471.88 5403336.47, 4457472.53 5403336.79, 4457472.08 
5403341.31, 4457472.04 5403341.71, 4457472.03 5403341.83, 4457513.210 
5403346.130, 4457513.219 5403346.129, 4457513.266 5403346.120, 
4457513.314 5403346.109, 4457513.360 5403346.096, 4457513.406 
5403346.081, 4457513.452 5403346.063, 4457513.496 5403346.044, 
4457513.539 5403346.022, 4457513.582 5403345.998, 4457513.623 
5403345.973, 4457513.663 5403345.945, 4457513.670 5403345.940, 
4457513.680 5403345.933, 4457513.718 5403345.903, 4457513.754 
5403345.871, 4457513.789 5403345.837, 4457513.823 5403345.802, 
4457513.854 5403345.765, 4457513.884 5403345.727, 4457513.912 
5403345.687, 4457513.938 5403345.646, 4457513.963 5403345.604, 
4457513.985 5403345.561, 4457513.99 5403345.55, 4457514.61 5403339.69, 
4457515.27 5403339.78, 4457515.76 5403335.67, 4457515.04 5403335.56, 
4457515.660 5403329.770, 4457515.660 5403329.769, 4457515.643 
5403329.718, 4457515.624 5403329.668, 4457515.602 5403329.619, 
4457515.578 5403329.571, 4457515.552 5403329.524, 4457515.524 
5403329.478, 4457515.494 5403329.434, 4457515.461 5403329.391, 
4457515.427 5403329.350,
<i mean this>
4457515.390 5403329.310, 4457515.390 5403329.310,
</i mean this>
4457515.378 5403329.298, 4457515.339 5403329.261, 4457515.299 
5403329.225, 4457515.257 5403329.192, 4457515.213 5403329.161, 
4457515.168 5403329.131, 4457515.122 5403329.104, 4457515.074 
5403329.079, 4457515.026 5403329.057, 4457515.01 5403329.05, 4457514.91 
5403329.03, 4457507.42 5403328.25, 4457484.31 5403325.86)))' );
  isvalid
---------
  t


Postgis will check it as valid despite it has two identic points 
following each other.

a) Is this correct?
b) When I produce a shape from this with pgsql2shp, both points are 
written to a shape, producing a shape that does not conform to the specs.
c) How to avoid that? I.e. is there a way to suppress subsequent 
identical points?
-- 
Mit freundlichen Grüßen / With kind regards

Hubert Fröhlich

-------------------------------------------------------------------------------
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



More information about the postgis-users mailing list