0

This has already been asked, sadly not a proper answer has been given.

I come here with a specific request: make vector pbf tiles from this GeoPDF map

Things I have tried:

  • Drag and drop the PDF directly into QGIS. It gets imported but coloured lines get extremely pixelated.
  • In QGIS, use the Add Layer option for vector and raster. Vector layers get imported but sadly the raster image has horrible quality.
  • Use ogr2ogr and gdal and ps2edit to get the info of the PDF, translate to SVG and convert to DXF, to later repeat the previous step, but all the colouring (styling?) is lost in the process.
  • Using Inkscape, the GeoPDF gets perfectly imported (without Geo data), I converted it to SVG, DXF, HPGL but only DXF was admited by QGIS but losing layers and styling.

Many have suggested using raster tiles instead, but I would like to exploit the full potential of the clearer, more size efficient .pbf tiles instead of high res png.

If only vectors (without fill colours, etc) can be drawn from the GeoPDF, is it possible to extract (?) the styling from the PDF?

Any new processes/ideas?

5
  • 2
    You can just dump the raster content if you want to save data into vector tiles. Vector tiles contain only vectors.
    – user30184
    Commented Jan 31, 2023 at 20:31
  • But the colours, styling I mean, how can I extract it from the PDF too? @user30184 Commented Jan 31, 2023 at 20:35
  • 1
    I do not know any tool that could capture the colors from PDF vectors and convert them into Mapbox styles but such may exist. Otherwise you must re-write the styles manually with for example Maputnik maputnik.github.io. That will be hard work.
    – user30184
    Commented Jan 31, 2023 at 20:44
  • 1
    If this question has already been asked, the proper procedure is to create a bounty on the existing question to help get new answers. It is problematic to have multiple copies of the same question on the site because it makes it difficult for users to find the correct answer.
    – Aaron
    Commented Feb 3, 2023 at 19:01
  • 1
    It has already been asked but not with this exact starting parameters. Commented Feb 4, 2023 at 19:50

1 Answer 1

0

GlobalMapper can do this, however it might time consuming...

enter image description here

It can read the GeoPDF directly and also convert Raster to Vector - but user interaction is required to 'color pick' so the RGB colours for each color can be exported to Mapbox tileset.

It might be a better approach to quadtile the underlying raster. https://wiki.openstreetmap.org/wiki/QuadTiles

GlobalMapper is not a free mapping product: https://www.bluemarblegeo.com/global-mapper/

Example enter image description here

6
  • What would be the steps to make this possible in Global Mapper? I see you imported the GeoPDF as raster, then deselected the layers you didn't want, but what else has to be done to convert that into vector .pbf tiles? Commented Feb 1, 2023 at 9:21
  • Create Area Features from Equal Values >bluemarblegeo.com/knowledgebase/global-mapper-19/…
    – Mapperz
    Commented Feb 1, 2023 at 13:57
  • Oh okay I see. But how did you manage to get such a clear vector layer? My attempt has too many "poligons". What settings did you use for importing the PDF and the Create Area from Equal Values? I have been tweaking them but I did not even come close to your result. @Mapperz Commented Feb 1, 2023 at 16:08
  • Default GeoPDF settings added - imported at 600dpi
    – Mapperz
    Commented Feb 1, 2023 at 16:14
  • How exactly is the process of "color pick" done? Is there any source I can follow to learn how to do this? @Mapperz Commented Feb 4, 2023 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.