Hi Ajay, I haven't struck this problem but I wonder why are you going through the GT feature collection stage ? Why not just deal with the geometries directly, perhaps with a CoordinateFilter class ?
Michael 2008/11/11 AJ R <[EMAIL PROTECTED]>: > Hi > > I am not sure if this is really a JTS issue or GeoTools Issue. I am creating > a MultiGeometry consisting of multiple MultiPolygons stored in our PostGIS > database. I am basically trying to convert the PostGIS geometry into KML. > Essentially what I do is I read the WKT from the database and add it to a > FeatureCollection and then invoke getDefaultGeometry() from the > FatureCollection. Once I get the Geometry, I get the coordinates array and > iterate through it to extract the individual polygons so I can create a KML > file. > > Now for the problem I am facing. > > When I create the above Geometry, for some inexplicable reason, some of the > closed polygons have duplicate coordinate entries. For example one of the > closed polygons has the following format { (a1, a1) ,{...list of other > coordinates}, (a1,a1) , (a1,a1) } { ...list of other multipolygon > coordinates...}. > > Observe the fact that (a1, a1) has been repeated a total of three times when > it should only be twice to create a closed polygon. This happens only for > certain polygons and not all of them. Does anyone have any clue as to why > this happens? I can of course write extra code to handle this situation but > it would be more helpful if I could figure out why this even happens. > > Thanks in advance for the help. Let me know if there is anything else I can > add to help you to help me. > > Regards > > Ajay Ravichandran > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Geotools-gt2-users mailing list > Geotools-gt2-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users