On 10-12-06 06:54 AM, iomeneandrei wrote:
Hi all, is there in OGR a command that I can use to convert multipart polygons in singleparts?
Andrea, At the API or scripting level there is the OGRGeometryFactory::forceToPolygon() method to try and convert a multipolygon to a simple polygon. I am not aware of a way to do this from the commandline utilities. /************************************************************************/ /* forceToPolygon() */ /************************************************************************/ /** * \brief Convert to polygon. * * Tries to force the provided geometry to be a polygon. Currently * this just effects a change on multipolygons. The passed in geometry is * consumed and a new one returned (or potentially the same one). * * @param poGeom the input geometry - ownership is passed to the method. * @return new geometry. */ OGRGeometry *OGRGeometryFactory::forceToPolygon( OGRGeometry *poGeom ) Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev