maptiler / qgis-maptiler-plugin

QGIS MapTiler Plugin: vector tiles, basemaps, geocoding, OSM, QuickMapServices
GNU General Public License v2.0
83 stars 10 forks source link

Layer order on SVG output not matching layer order in layer styles #118

Closed sdbernard closed 4 years ago

sdbernard commented 4 years ago

I'm getting very close to the style I'm after in QGIS now, there is a small issue with the order the layers are rendering when exporting as an SVG

This is in the QGIS canvas... image

This is the SVG opened in Adobe Illustrator... image

As you can see the grey road borders are rendering in the wrong order. I have them all before the the white roads in the layer order... image

lazaa32 commented 4 years ago

Can you provide us your style.json so I can test it?

sdbernard commented 4 years ago

Sure thing Adam... https://api.maptiler.com/maps/47b20404-cb5f-4244-bb1e-110968bf9fbb/style.json?key=IoyNas5xFwEQfz7OZVzh

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 1 Jul 2020 at 11:22, Adam Laža notifications@github.com wrote:

Can you provide us your style.json so I can test it?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-652333474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5B6HHDDWJBIQNDDSFTRZME6VANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

lazaa32 commented 4 years ago

The style you provided has different layers then you have in the picture. Do you edit style in QGIS or MapTiler cloud?

sdbernard commented 4 years ago

I edited them in QGIS, but I have them in the correct rendering order, ie the grey road boundaries are all below the white roads. It render fine inside QGIS just not on export of the SVG

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 1 Jul 2020 at 12:20, Adam Laža notifications@github.com wrote:

The style you provided has different layers then you have in the picture. Do you edit style in QGIS or MapTiler cloud?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-652359435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5BHI3ZVMMEMO5UGNFLRZMLW3ANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

sdbernard commented 4 years ago

if it helps I can send you the style file for the openmaptiles layer

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 1 Jul 2020 at 12:23, Steve Bernard steve.bernard@ft.com wrote:

I edited them in QGIS, but I have them in the correct rendering order, ie the grey road boundaries are all below the white roads. It render fine inside QGIS just not on export of the SVG

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 1 Jul 2020 at 12:20, Adam Laža notifications@github.com wrote:

The style you provided has different layers then you have in the picture. Do you edit style in QGIS or MapTiler cloud?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-652359435, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5BHI3ZVMMEMO5UGNFLRZMLW3ANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

lazaa32 commented 4 years ago

Actually plugin uses PyQGIS api to convert GL style to QGIS styling instead of QML style file. I would suggest you to edit your map in Customize tool on MapTiler Cloud, save it and add it to QGIS just to print it. That should prevent any issues with styling.

sdbernard commented 4 years ago

ahh ok, thanks Adam I'll give that a try

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 1 Jul 2020 at 13:07, Adam Laža notifications@github.com wrote:

Actually plugin uses PyQGIS api to convert GL style to QGIS styling instead of QML style file. I would suggest you to edit your map in Customize tool on MapTiler Cloud, save it and add it to QGIS just to print it. That should prevent any issues with styling.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-652379210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5BKKUVES6GM646SZL3RZMRGRANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

sdbernard commented 4 years ago

Hi Adam,

So I tried what you suggested and added the road borders in the MapTiler Cloud and the order issue is still there...

Map style https://api.maptiler.com/maps/17009da7-74f9-442a-ad5c-40dcd79e9eda/style.json?key=IoyNas5xFwEQfz7OZVzh

Road borders appearing above roads on SVG export... Looks fine in browser and in QGIS [image: image.png]

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 1 Jul 2020 at 13:07, Adam Laža notifications@github.com wrote:

Actually plugin uses PyQGIS api to convert GL style to QGIS styling instead of QML style file. I would suggest you to edit your map in Customize tool on MapTiler Cloud, save it and add it to QGIS just to print it. That should prevent any issues with styling.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-652379210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5BKKUVES6GM646SZL3RZMRGRANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

sdbernard commented 4 years ago

Hi Adam, so I've come up with a cunning work around which is to have three tile layers (all running from the same style)

Base one has everything in it and the other two just have the road borders and the roads.

My only concern is that it is going to mean I am using three times the number of tiles. But as we're only going to be using it in QGIS and not serving tiles on a website this may not be an issue

[image: image.png]

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Mon, 6 Jul 2020 at 17:45, Steve Bernard steve.bernard@ft.com wrote:

Hi Adam,

So I tried what you suggested and added the road borders in the MapTiler Cloud and the order issue is still there...

Map style

https://api.maptiler.com/maps/17009da7-74f9-442a-ad5c-40dcd79e9eda/style.json?key=IoyNas5xFwEQfz7OZVzh

Road borders appearing above roads on SVG export... Looks fine in browser and in QGIS [image: image.png]

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 1 Jul 2020 at 13:07, Adam Laža notifications@github.com wrote:

Actually plugin uses PyQGIS api to convert GL style to QGIS styling instead of QML style file. I would suggest you to edit your map in Customize tool on MapTiler Cloud, save it and add it to QGIS just to print it. That should prevent any issues with styling.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-652379210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5BKKUVES6GM646SZL3RZMRGRANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

klokan commented 4 years ago

If you export to PDF - is it there the same or is the problem related only to SVG? If it is only a problem of SVG you can open it in Adobe Illustrator or another tool and use it as a transfer format instead.

sdbernard commented 4 years ago

Yes it does appear to be an SVG issue, the pdf imported fine apart it splitting text into separate text points for each letter...

Which is more of a headache than the layer order issue!

[image: image.png]

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Mon, 6 Jul 2020 at 18:12, Petr Pridal notifications@github.com wrote:

If you export to PDF - is it there the same or is the problem related only to SVG? If it is only a problem of SVG you can open it in Adobe Illustrator or another tool and use it as a transfer format instead.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-654361890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5AIETJ46UMQ3RT25Q3R2IAZNANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

lazaa32 commented 4 years ago

Hi Steve, unfortunately your image does not display here. As it looks like an SVG issue, is exporting to PDF sufficient solution for you?

sdbernard commented 4 years ago

Hi Adam, unfortunately PDF isn't an option as it separates text objects into individual letters in Illustrator.

I have however, come up with a cunning work around which is to have three tile layers (all running from the same style)

Base one has everything in it and the other two just have the road borders and the roads. [image: roads.jpg]

My only concern is that it is going to mean I am using three times the number of tiles. But as we're only going to be using it in QGIS and not serving tiles on a website this may not be an issue

Best Steve


Steven Bernard Senior Visual Journalist

+44 (0) - 207 873 4536 Bracken House 1 Friday Street London EC4M 9BT

https://www.ft.com/ https://www.facebook.com/financialtimes https://twitter.com/sdbernard http://www.linkedin.com/company/financial-times https://www.instagram.com/stevendbernard https://www.youtube.com/playlist?list=PL7HotvlLKHCs9nD1fFUjSOsZrsnctyV2R

On Wed, 8 Jul 2020 at 10:03, Adam Laža notifications@github.com wrote:

Hi Steve, unfortunately your image does not display here. As it looks like an SVG issue, is exporting to PDF sufficient solution for you?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/maptiler/qgis-maptiler-plugin/issues/118#issuecomment-655390955, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATFD5CZ2IK5RV4PYOKD3PLR2QY7NANCNFSM4OMOLVOA .

--

This email was sent by a company owned by Financial Times Group Limited ("FT Group http://aboutus.ft.com/corporate-information/#axzz3rajCSIAt"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming  emails as permitted by law.

lazaa32 commented 4 years ago

Thanks Steve for your workaround. Closing for now.