[GeoNode-users] problem with sld
Ivan Marchesini
ivan.marchesini at gmail.com
Sat Nov 25 06:13:32 PST 2017
Thank you Ariel
It is useful to know that some others have found the same problem and
thank you for the workaround
In case I do not find another solution I will try to write a python code
to do this..
thank you
Ivan
On 24/11/2017 19:31, Ariel Neri wrote:
> Hi, I had to adapt many complicated, hundred of clases simbology sld
> made in qgis to be used in Geoserver some time ago. I tried some
> programs with no luck, so finally I changed a few things in the QGis
> sld file to make it work in Geoserver.
>
> Basically it´s just 3 steps, using the "search and replace" tool:
>
> 1- i replaced the first line with one from an existing geoserver sld:
> <?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor
> xmlns="http://www.opengis.net/sld"
> xmlns:sld="http://www.opengis.net/sld"
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
>
> 2- Also copy the first lines raplacing the "****" with your own
>
> <sld:NamedLayer>
>
> <sld:Name>******</sld:Name>
>
> <sld:UserStyle>
>
> <sld:Name>*****</sld:Name>
>
> <sld:Title>******</sld:Title>
>
> <sld:Abstract>******</sld:Abstract>
>
> <sld:FeatureTypeStyle>
>
> <sld:Name>name</sld:Name>
>
> and do the same with the closings
>
> </sld:FeatureTypeStyle>
>
> </sld:UserStyle>
>
> </sld:NamedLayer>
>
> </sld:StyledLayerDescriptor>
>
>
> 3- Use the search and replace tool: replace “<se:” and“</se:”
> with“<sld: (…)” and“</sld: (…)” respectivly. And replace
> “SvgParameter” with “CssParameter”
>
>
> Sorry if i don´t use correct vocabulary, i´m not so much into coding,
> neather into english language.
> A co-worker made a script to do the steps before automatically with
> RStudio and made it even simpler for me.
>
> This was a good enough work-around for me and solved my problem.
> Probably now there´s a better way (i hope so). I share anyway in case
> it helps you.
>
>
> 2017-11-24 14:43 GMT-03:00 Ivan Marchesini <ivan.marchesini at gmail.com
> <mailto:ivan.marchesini at gmail.com>>:
>
> Dear geonode users and developer
>
> I apologize if this is a well known problem but browsing on
> Internet (including the mailing list) I wasn't able to find a good
> solution
>
> I have recently installed geonode2.6 (ubuntu, ppa) for a project
> where multiple and not skilled users will be involved.
>
> I have tried to do a couple of things:
>
> 1) I uploaded a shapefile (separate files) together with a sld
> file exported from qgis. It happened to me that (i) the
> corresponding sld file created in geoserver is very different from
> the original one (tipicaly the colors are lost) and (ii) since
> the <Title> tag is not present geonode is only able to show me a
> style called "none"
>
> 2) I uploaded a shapefile (separate files) together with a sld
> file exported from udig. It happened to me that (ii) since the
> <Title> tag is not present geonode is only able to show me a style
> called "none"
>
> is there a way for creating a well formatted sld file for
> geoserver/geonode using some desktop GIS or some other tools with
> a GUI?
> It is very important to me since I can't ask the other colleagues
> to edit directly the xml files.. they will be too much scared by
> that!!
>
> thank you for your answers
>
> Ivan
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org <mailto:geonode-users at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/geonode-users
> <https://lists.osgeo.org/mailman/listinfo/geonode-users>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20171125/5ed79ae1/attachment.html>
More information about the geonode-users
mailing list