kartoza / geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
http://geonode.org/
GNU General Public License v3.0
8 stars 17 forks source link

Management commands for uploading layers need to be updated #282

Open NyakudyaA opened 7 years ago

NyakudyaA commented 7 years ago

Problem

I have a layer published in geonode and wanted to change the style for the layer. So I uploaded a new layer style and the file to the server. I ran management commands python manage.py uploadlayers -o folder_path The - o option allows file overwrite. I expect the layer style to be updated.

Observation

Solution

This problem is also related to #149

lucernae commented 7 years ago

This will be quite challenging at first thought, but I will give it a try. The easiest way is to just add extra lines for QGIS Server and not thinking about abstractions at the moment.

Gustry commented 7 years ago

AFAIK, we rename the layer with a random string at the end if one layer is already existing with the same name, isn't it ?

lucernae commented 7 years ago

importlayers management command from geonode will replace the existing layer, so it will have the same name, at least that's what I saw from day to day observations.

lucernae commented 7 years ago

I checked it again and Geonode gave a random string. My memories is playing tricks on me!

Gustry commented 7 years ago

I just checked my qgis_layer directory, and I have a random string if the layer is there many times. So I don't know we can track down for the original layer name.

screen shot 2017-06-29 at 08 40 07
lucernae commented 7 years ago

@NyakudyaA I addressed these requests:

  • Ensure that when a user uses the overwrite function for uploading an existing layer all references of the layer are actually rewritten.
  • Overwrite function should trigger a delete of qgis project, tile cache and generate new ones

However it still generates random string at the end

gubuntu commented 6 years ago

please test again @NyakudyaA

NyakudyaA commented 6 years ago

This seems to be partially working. All the tiles are removed and the new style propagates but the thumbnail looks like it isn't being regenerated again. thu

The layer being rendered here over