[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [udig-devel] Problem exporting MultiPolygon(GeometryCollections) to	Shapefile | 
Hi, list.
First of all, happy new year!!!
To continue, we have an exporting problem...
Scenario:
1) There is a MemoryLayer with a MultiPolygon GeometryType
2) We need to export this layer to a shapefile
3) Using the Export Wizard, nothing happen
Shoulders to the wheel!:
Debugging the uDig code, we find the class CatalogExport, which contains an internal CatalogExportWizard class. 
This internal class has the method performFinish to realize the effective export of a layer and, I think, it has the problem...
We could see [lines 198-231] that only the GeometryTypes (Point, Line and Polygon) will be exported...and all the GeometryCollection types will be omitted.
I thought that MultiPolygon extends Polygon class, but 
inspecting the JTS Geometry hierarchy we find:
Geometry
    +---------> GeometryCollection
     |                    +----------> MultiLineString
     |                    +----------> MultiPoint
     |                    +----------> Multipolygon
    +---------> LineString
    +---------> Point
    +---------> Polygon
And, obviously, the cast (Polygon) discard the MultiPolygon GeometryType...
It's right?
(We are trying SDK 1.1.0-RC8)
Un saludo
-- 
Javier Cámara
Subdirección de Integración de Sistemas
E.P. Desarrollo Agrario y Pesquero 
c/Bergantín, 39 - 41012 Sevilla.  España