Closed mooreja closed 11 years ago
@mooreja looks like some code was changed upstream in geonode that checks the list of files you are uploading and it doesnt like the .sld (or .xml for metadata) ... (#33 is also related). I disabled this and then Im able to upload a .sld with the other shapefile components at the initial import time.
You should still be able to change the style being used if multiple styles are available, but there is currently no way to add/upload a new style to an existing layer. We can add a new issue for that if its required.
This has nothing to do with uploading an sld but assigning an already existing sld to the layer being uploaded rather than using / building a default. It gets real messy and a bad workflow if you have to accept a geonode created style for upload and then edit afterwards.
Also, a few weeks back you could change the style for a layer after it was uploaded but right now it is not providing / recognizing any available sld's except for the style created during upload.
On Thu, May 23, 2013 at 2:06 PM, Jeffrey Johnson notifications@github.comwrote:
@mooreja https://github.com/mooreja looks like some code was changed upstream in geonode that checks the list of files you are uploading and it doesnt like the .sld (or .xml for metadata) ... (#33https://github.com/ROGUE-JCTD/geonode/issues/33is also related). I disabled this and then Im able to upload a .sld with the other shapefile components at the initial import time.
You should still be able to change the style being used if multiple styles are available, but there is currently no way to add/upload a new style to an existing layer. We can add a new issue for that if its required.
— Reply to this email directly or view it on GitHubhttps://github.com/ROGUE-JCTD/geonode/issues/31#issuecomment-18361071 .
James Moore Systems Engineer LMN Solutions 12021 Sunset Hills Rd Reston, VA 20190
703-429-2567 (O) 703-577-1191 (C)
Jim, I will do some more tests, but it appears that if you configure additional styles in the GeoServer interface you can select them to be used in the GeoNode interface, but only after running updatelayers on the cli such that geonode is made aware of these additional styles. Just configuring them in GeoServer is not enough since GeoNode has to be made aware of the additional styles.
There is currently no way to configure this sort of thing completely in GeoNode, it still requires doing things in the geoserver UI and then using updatelayers to make sure they are in sync. I think you can bypass the updatelayers step by just 'saving' the layer in any way (i.e. updating the metdata) as the post_save hooks will query geoserver for additional styles.
It used to be that this was hitting geoserver directly for the styles every time the page loaded, but this proved to be hugely inefficient and if there were any problems or tardiness on the geoserver side, the geonode page would simply error out. We switched to caching the style references in GeoNodes database, but this is only triggered when the layer is saved.
We can discuss what workflow you are trying to achieve and try to accomodate it ... working around limitations if we need to.
On Thu, May 23, 2013 at 11:48 AM, James Moore notifications@github.comwrote:
This has nothing to do with uploading an sld but assigning an already existing sld to the layer being uploaded rather than using / building a default. It gets real messy and a bad workflow if you have to accept a geonode created style for upload and then edit afterwards.
Also, a few weeks back you could change the style for a layer after it was uploaded but right now it is not providing / recognizing any available sld's except for the style created during upload.
On Thu, May 23, 2013 at 2:06 PM, Jeffrey Johnson notifications@github.comwrote:
@mooreja https://github.com/mooreja looks like some code was changed upstream in geonode that checks the list of files you are uploading and it doesnt like the .sld (or .xml for metadata) ... (#33< https://github.com/ROGUE-JCTD/geonode/issues/33>is also related). I disabled this and then Im able to upload a .sld with the other shapefile components at the initial import time.
You should still be able to change the style being used if multiple styles are available, but there is currently no way to add/upload a new style to an existing layer. We can add a new issue for that if its required.
— Reply to this email directly or view it on GitHub< https://github.com/ROGUE-JCTD/geonode/issues/31#issuecomment-18361071> .
James Moore Systems Engineer LMN Solutions 12021 Sunset Hills Rd Reston, VA 20190
703-429-2567 (O) 703-577-1191 (C)
— Reply to this email directly or view it on GitHubhttps://github.com/ROGUE-JCTD/geonode/issues/31#issuecomment-18363804 .
Actually it appears update layer does not need to be run. Update layer has a separate bug in that it activates all layers where Advertise was deactivated. The sld's can be viewed after creation through editing of the metadata but currently assigning a valid sld to an imported layer cannot be accomplished on import, only after a layer has been imported and then through editing of metadata.
This is now handled in my style-manage branch, Im working getting it merged into geonode master before the next beta. Still need the ability to upload a whole new sld this way too.
@mooreja This branch was merged to master. Lets test as soon as we can get your VMs updated
On importing a layer I want to assign an existing sld to the layer being imported. The import does not provide that option.
Also, I cannot assign a different sld to an existing layer. The layer edit does not provide a list of available sld's.
Both of these worked several weeks back.