Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Re: Problem exporting MultiPolygon(GeometryCollections) to Shapefile

Could be a solution the use of the class net.refractions.udig.sld.SLD to check the GeometryTypes?

By example...

if (SLD.isPolygon(schema)) {
       writeToShapefile(polyFeatures, polyFile);
       addToCatalog(polyFile);
}
[.........]

in front of ....

CompareFilter polyFilter = createGeometryTypeFilter(geomName, Polygon.class.getSimpleName());
FeatureCollection polyFeatures = fs.getFeatures(polyFilter);
if (!polyFeatures.isEmpty()) { //alternatively .iterator.hasNext
       writeToShapefile(polyFeatures, polyFile);
       addToCatalog(polyFile);
}
[.........]

Otro 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

Back to the top