> -----Ursprüngliche Nachricht-----
> Von: Andrea Aime [mailto:[EMAIL PROTECTED]
> Gesendet: Samstag, 23. Dezember 2006 12:45
> An: Szakacs, Balazs
> Cc: [email protected]
> Betreff: Re: [Geotools-gt2-users] Poligon with hole ... Please helpme
> 
> Szakacs, Balazs ha scritto:
> > 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.
> 
> It's not a bug. It's a clear example of invalid polygon according to
> the OGC simple feature specification, page 2-9, figure 2.5.
> See http://cgns-dev.nrcan.gc.ca/cgns_web/docs/sld-071-r0.pdf
> That thing must be represented as a single ring touching itself in a
> single point afaik (but I'm not sure, you have to try out).
> 
> Hope this helps
> Andrea Aime

Hi Andrea,

I've read the referenced document more times, and I found in figure 2.5(1) as 
invalid polygon if the hole touches the outer ring at more than one point but 
this is not my case.

I think if the hole touch the outer ring at only one single point, the check of 
the all 6 rules of Polygon should be OK, but your tools doesn't accept.

In previous mail I've   sent you the generated transaction request, there can 
be seen this is really an inner and outer ring definition.

Thanks and
Happy New Year 

Balazs

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

Reply via email to