[Geoserver-devel] I would like to propose the following improvement

Dear GeoServer,

I have been directed to this mailing list as a place to propose an improvement. I had asked this question originally on GIS StackExchange thinking it was a geonetwork problem but a reply has pointed me to it being a GeoServer issue.

My question is well documented in this Q&A thread (https://gis.stackexchange.com/questions/329684/how-to-include-the-metadata-in-a-shapefile-download-from-geonetwork) so please have a quick look at it to understand the issue.

In summary I would like GeoServer to include the XML (metadata) file along with the rest of the files that are zipped up for a shapefile. I would typically document my dataset using ArcCatalog and that creates the additional XML file holding all the metadata. As I say in my question on GIS SE we get into a scenario of distributing datasets without any metadata which is not good!

Ian’s reply seems to suggest a tweak in the source code could resolve this, but I’m neither a heavy user of github nor a web developer so I’m hoping this could be something that is added by someone way more competent than I!

One thing I can think of is the xml file is not a mandatory part of a shapefile so the tweak to the source code would need to include it if it existed otherwise carry on zipping it up without failing.

Thank you,

Duncan

The real challenge is our community does not have any spare capacity to tackle new feature requests at present. However let’s see if this is possible, incase you want to pursue this with a volunteer or service provider…

Initially I think this would be a feature request - we tend to save proposals for strategic choices that impact application stability (and thus need to be voted on.)

GeoServer by itself does not interact directly with Shapefiles, we use the GeoTools data access library. GeoTools, does not have any significant support for the shape file metadata file, so …

Q: Do you know if the ESRI the shp,xml file format is documented anywhere, or has been reverse engineered?

Q: Does the shape file metadata xml file include the concept of bounds or a description of attributes? Both may of been modified or processed as part of a WFS request …

Options/Ideas:

  1. Improve the GeoTools shape file representation to communicate if an metadata xml file was present, allowing us to check if is present and blindly include the contents when zipping …

  2. Improve the GeoServer FeatureTypeInfo API, so any format can nominate files to be included when zipping. This would allow other things like a readme, sld, etc… to be packaged up if present. This would be an API change so a proposal would be required.

  3. Create a new custom format that does exactly what you want …

···


Jody Garnett

Dear Jody,

If reclassifying my idea as a feature request then please do. I don’t see this as a major change to anything just a tweak to include an additional file if it exists.

For your two questions, don’t know and don’t understand what you are asking.

As for your ideas, idea 1 is exactly what I was thinking, simply include the xml file in the zip and if I have understood you correctly that is more of a tweak to GeoTools than anything to do with GeoServer? Ian’s response seems to hint that it could be a simple change in the code here (https://github.com/geoserver/geoserver/blob/master/src/wfs/src/main/java/org/geoserver/wfs/response/ShapeZipOutputFormat.java#L231)? Or is it a tweak to both systems?

Your second idea was initially more interesting but when you look at that GeoTools page you provide a link to the additional files are either symbology files or indexing files. Indexes can easily be created by the end user and is less data to be storing and throwing around the internet and well I’m of the opinion that the colour scheme I like is never what you like or want so why include it. If a corporate styling is required that could be obtained via alternative means. So this focusses me back to idea 1 which is simply include the xml file in the zipfile it is exists. This fulfils my desire to be supplying data with its metadata (if it has it). Idea 3 seems not appropriate to me?

Duncan

···

The real challenge is our community does not have any spare capacity to tackle new feature requests at present. However let’s see if this is possible, incase you want to pursue this with a volunteer or service provider…

Initially I think this would be a feature request - we tend to save proposals for strategic choices that impact application stability (and thus need to be voted on.)

GeoServer by itself does not interact directly with Shapefiles, we use the GeoTools data access library. GeoTools, does not have any significant support for the shape file metadata file, so …

Q: Do you know if the ESRI the shp,xml file format is documented anywhere, or has been reverse engineered?

Q: Does the shape file metadata xml file include the concept of bounds or a description of attributes? Both may of been modified or processed as part of a WFS request …

Options/Ideas:

  1. Improve the GeoTools shape file representation to communicate if an metadata xml file was present, allowing us to check if is present and blindly include the contents when zipping …

  2. Improve the GeoServer FeatureTypeInfo API, so any format can nominate files to be included when zipping. This would allow other things like a readme, sld, etc… to be packaged up if present. This would be an API change so a proposal would be required.

  3. Create a new custom format that does exactly what you want …

Jody Garnett

On Thu, 8 Aug 2019 at 07:14, Hornby D. <ddh@anonymised.com> wrote:

Dear GeoServer,

I have been directed to this mailing list as a place to propose an improvement. I had asked this question originally on GIS StackExchange thinking it was a geonetwork problem but a reply has pointed me to it being a GeoServer issue.

My question is well documented in this Q&A thread (https://gis.stackexchange.com/questions/329684/how-to-include-the-metadata-in-a-shapefile-download-from-geonetwork) so please have a quick look at it to understand the issue.

In summary I would like GeoServer to include the XML (metadata) file along with the rest of the files that are zipped up for a shapefile. I would typically document my dataset using ArcCatalog and that creates the additional XML file holding all the metadata. As I say in my question on GIS SE we get into a scenario of distributing datasets without any metadata which is not good!

Ian’s reply seems to suggest a tweak in the source code could resolve this, but I’m neither a heavy user of github nor a web developer so I’m hoping this could be something that is added by someone way more competent than I!

One thing I can think of is the xml file is not a mandatory part of a shapefile so the tweak to the source code would need to include it if it existed otherwise carry on zipping it up without failing.

Thank you,

Duncan


Duncan Hornby

GIS Developer

GeoData

University of Southampton

Southampton

SO17 1BJ

Tel: +44 (0)23 8059 2719

www.geodata.soton.ac.uk


ORCID 0000-0001-6295-1360


Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

That list Ian provide was to collect the results of saving a new Shapefiles (representing query results). In this case you want to go back to the original file and collect up some of the details…

···


Jody Garnett