Hi guys,
I made few improvements to the GeoServer RESTConfig and sldService stuff which I would like to briefly discuss here, and in case of interest I can commit it:
-
DataStoreFileResource: this class originally was intended to let GeoServer get a shapefile and create a new datastore. I corrected some errors and changed a bit the behavior. Originally this resource was checking just for the arrival of a single .shp file, which is not sufficient for my needs; so I changed it in order to let it accept a ZIP file containing the whole Shapefile stuff, decompress it into GeoServer data dir, create the new datastore and contextually create the FeatureType also.
-
FeatureTypeResource: this class allows a user to insert/update a FeatureType. Originally the resource constrained the user to send the whole feature type properties everytime. I changed a bit in order to let a user to update also just some of the properties of the FeatureType if the latter is already present in the catalog.
-
StyleResource: this resource was incomplete, in particoular it didn’t save the style on the catalog and also didn’t check for the style existence in the case of a replacement. I changed it to perform those tasks.
-
SimpleClient: I put this simple utility class in the test package in order to allow users to perform simple GET/POST/PUT/DELETE requests to the REST interfaces. It is not fully complete though.
-
on sldService I added few Resources to let users to easily generate color classifications and optionally color Ramps, without the need to create and save a new SLD. Maybe they are redoundant, but very usefull to me. On a POST request, the user can specify the datasotre, the property, the type of color quantization to apply and the number of classes. The user can also send as optional parameters of the form the type of color ramp to generate and in case of custom color ramp also the start, end and mid colors. The result is a JSON string representing the quantization rules. Each rule consists basically of a title, a filter and if the color ramp was specificed a symbolizer describing the fill to apply.
-
I added to the sldService a UserStyleResource which allows a user to modify the default SLD of a wms layer, independetly if it is generated from a featuretype or a coverage. Not yet fully complete though.
Cheers,
Alessio.
–
Eng. Alessio Fabiani
Vice-President /CTO GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy
phone: +39 0584983027
fax: +39 0584983027
mob: +39 349 8227000