Dear Group
Please commit to me if this bug or not.
I'm trying to insert a very simple polygon with hole in multipolygon
environment. The hole touches the exterior with one single point.
+----------+----------+
| / \ |
| / \ |
| / \ |
| +-------+ |
| Inner ring |
| |
+---------------------+
Outer ring
The insert transaction (see below) can be tested with geoserver sample
requests client.
In this case after a warning ("Topology Error building polygon") I get
an error message too.
The reason is in SubHandlerPolygon.java in Line 217.
/**
* Returns the completed OGC Polygon.
*
* @param geometryFactory Geometry factory to be used in Polygon
creation.
*
* @return Completed OGC Polygon.
*/
public Geometry create(GeometryFactory geometryFactory) {
for (int i = 0; i < innerBoundaries.size(); i++) {
LinearRing hole = (LinearRing) innerBoundaries.get(i);
if (hole.crosses(outerBoundary)) {
LOGGER.warning("Topology Error building polygon");
return null;
}
}
return geometryFactory.createPolygon(outerBoundary,
(LinearRing[]) innerBoundaries.toArray(new LinearRing[0]));
}
In this case result of "if (hole.crosses(outerBoundary))" is FALSE !!
I think this is wrong and neither conforms to OGC Simple Feature spec.
nor JTS Tech Spec.
Please let me know if can you commit this as bug or I'm wrong.
Thanks
Balazs Szakacs
<?xml version="1.0" encoding="ISO-8859-1"?>
<Transaction xmlns:wisa="http://www.lfrz.at"
xmlns="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.lfrz.at
http://tsvie01chatt:8080/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&
;REQUEST=DescribeFeatureType&TYPENAME=wisa:V_S_EZG" version="1.0.0"
service="WFS" lockAction="ALL"><Insert><wisa:V_S_EZG
fid="newwisa:V_S_EZG.9223372036854775807">
<wisa:SHAPE>
<gml:MultiPolygon srsName="EPSG:31287">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">
0,0 1000,0 1000,1000 0,1000 0,0
</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
<gml:innerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">
500,200 900,200 700,1000 500,200
</gml:coordinates>
</gml:LinearRing>
</gml:innerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</wisa:SHAPE>
<wisa:HYDROID>10000006</wisa:HYDROID>
</wisa:V_S_EZG>
</Insert>
</Transaction>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users