[udig-devel] Re: Problem exporting MultiPolygon(GeometryCollections) to Shapefile

Javier Cámara javiercamaraperez at gmail.com
Tue Jan 9 05:34:50 PST 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.refractions.net/pipermail/udig-devel/attachments/20070109/361e3d9a/attachment.html


More information about the udig-devel mailing list