Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement setting the style body inside an importer session task #320

Open
giohappy opened this issue Dec 3, 2021 · 0 comments
Open

Implement setting the style body inside an importer session task #320

giohappy opened this issue Dec 3, 2021 · 0 comments

Comments

@giohappy
Copy link

giohappy commented Dec 3, 2021

For a finer control of the default styles generated for layers uploaded with GeoNode, and in particular to be able to generate CSS default styles for new layers, we are forced to do the following:

  • create the new layer with an importer session
  • the importer generates a default style for the new layer starting from Geoservers's (SLD) default styles
  • we create a new CSS style on Geoserver and we set this style as the default for the new layer
  • we delete the SLD default style generated by the importer

Alternative solutions investigated:

  • make Geoserver use CSS default styles. We haven't tested how Geoserver behaves if its datadir is preconfigured with CSS default styles, in any case it will be problematic for existing datadirs. We would need to replace the SLD default styles "offline", otherwsie Geoserver will regenrate the SLD styles when they get removed.
  • upload the CSS style before the importer session, and then set the style name for the new layer inside the import task. This requires, in case of problems during the import session, to take care of removing the style to avoid piling up orphan styles

The best would be to extend the importer to support uploading the style body along with the layer data.
Ideally a new optional style object inside the JSON defintion of a File Upload task should let the caller pass the style body and the style name for the new layer.

@simboss, as from a quick chat with @aaime, I propose to estimate this development, since it would make the management of the default style much more robust and clean.

@giohappy giohappy changed the title Implement support to pass style body inside an importer Implement support to set the style body inside an importer session task Dec 3, 2021
@giohappy giohappy changed the title Implement support to set the style body inside an importer session task Support setting the style body inside an importer session task Dec 3, 2021
@giohappy giohappy changed the title Support setting the style body inside an importer session task Implement setting the style body inside an importer session task Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants