2

Using GeoTools, I'm able to write features to a shapefile by essentially passing a SimpleFeatureCollection to a ShapefileDataStore. The feature collection provides both a schema and features including their attribute values.

In addition to having the row-per-feature attribute table in the shapefile, I'd like to include file-level metadata - either structured fields or at least free-text title/description fields. Is there support for doing this in GeoTools? Or do I need to serialise my own *.shp.xml file?

2

The ,shp,xml file is a later ESRI specific addition to the 'standard' and is not documented anywhere so is not supported by GeoTools (or any one else).

The package org.geotools.data.shapefile.xml has a ShpXmlFileReader, but no ShpXmlFileWriter yet.

If you do develop some code to serialize metadata then feel free to offer it back to the GeoTools team.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.