Free Support Forum - aspose.com

Multipolygon issue

Dear team, seems theat there is a bug importing multipolygon from GML file. Please find attached GML and created shape files. If you try to import GML with QGIS, you can see the multipolygon looks like.multipolygon.zip (4.7 KB)

Hello, @geomir!

Thank you for reporting the issue.

We have reproduced the bug and created a ticket GISNET-517. We will notify you here as we will have progress with it.

Hello, @geomir,

Aspose.GIS 20.03 has been published. This release includes a fix for GISNET-517.

An XML Schema is missing or cannot be loaded in the attached Gml file. Please, consider this example or the following code to restore the attributes schema by data in file.

var options = new ConversionOptions()
{
SourceDriverOptions = new GmlOptions() { RestoreSchema = true }
};
VectorLayer.Convert(fromFile, Drivers.Gml, toFile, Drivers.Shapefile, options);

Note: in QGIS, the GML reader does not require the presence of an XML Schema definition of the feature classes (file with .xsd extension) to be able to read the GML file. If the .xsd file is absent or OGR is not able to parse it, the driver attempts to automatically discover the feature classes and their associated properties by scanning the file and looking for “known” gml objects in the gml namespace to determine the organization. While this approach is error prone, it has the advantage of working for GML files even if the associated schema (.xsd) file has been lost…

Please let me know if you experience any other problems.