What are GML files?
The Geography Markup Language (GML) is the XML grammar defined by the Open Geospatial Consortium (OGC) to express geographical features. GML serves as a modeling language for geographic systems as well as an open interchange format for geographic transactions on the Internet. The concept of GML includes not just vector data but also coverages and sensor data. The ability to integrate all forms of geographic information is key to the utility of GML.
Because the GML format is flexible and allows you to specify your own schemas, semantics, and options, there are many variations of the format. The GML import functions in GeoTools have been written based on samples of GML data obtained from Netherlands. It is our goal to handle as many variations of the GML format as possible.
If any of you use GML files that you can share with me for testing purposes, I would greatly appreciate that.
email me at rakesh.rao(at)4d-technologies.com
I also understand that a variant of this format is the Ordnance Survey of Great Britain MasterMap GML version. If any of you use this format, I would like to hear from you and probably get some sample data. We are keen to support import of these file formats into BricsCAD (and AutoCAD).
How this works in GeoTools?
We have provided two tools to process and import GML data - GT_EXTRACTGMLFEATURES and GT_READGMLFEATURES.
GT_EXTRACTGMLFEATURES (GeoTools -> Export -> Extract individual GML features from GML file): The GT_EXTACTGMLFEATURES command takes the master GML file and splits it into individual GML files - one per feature. This makes managing GML data easier, which are often hundreds of megabytes in size. The splitted GML files will be automatically stored in a sub-folder and have a name beginning with the feature name, and a .GML extension.
GT_READGMLFEATURES (GeoTools -> Export -> Import a single GML feature from file): The GT_READGMLFEATURES command works on splitted GML files created by the GT_EXTRACTGMLFEATURES command, and import them into CAD creating point, line and polygon objects. The attribute data is atached as XDATA. There are options to read a single file, all files in the folder or read data feature-wise.
Remember to first run the GT_EXTRACTGMLFEATURES command and split your master GML file into individual feature files. Next, run the GT_READGMLFEATURES command and import each feature into CAD. These tools are not designed to run on an un-split GML file at once.
Follow us on Twitter: https://www.twitter.com/rakesh_rao