Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export GeoPDF when using tmap_save #383

Closed
CarlosAndres12 opened this issue Dec 20, 2019 · 5 comments
Closed

Export GeoPDF when using tmap_save #383

CarlosAndres12 opened this issue Dec 20, 2019 · 5 comments
Labels

Comments

@CarlosAndres12
Copy link

When saving a plot as pdf with tmap the result file does not keep the spatial information of the shapes or rasters used, is there a way to include it?.

Command used:
tmap_save(m_map,"result_map.pdf")

I also posted it on Stack Overflow.

@mtennekes
Copy link
Member

Not sure I understand your question. tmap_save just saves the outcome, not the data behind the plot. Why not also save the R object: saveRDS(m_map, "m_map.rds"), which also contains the shapes/rasters.

@CarlosAndres12
Copy link
Author

Not sure I understand your question. tmap_save just saves the outcome, not the data behind the plot. Why not also save the R object: saveRDS(m_map, "m_map.rds"), which also contains the shapes/rasters.

The GeoPDF can be imported in external tools like QGIS and keep the spatial information, see: Geospatial PDF

@tim-salabim
Copy link

GDAL has a GeoPDF driver, so st_write should be able to write your data to GeoPDF

@CarlosAndres12
Copy link
Author

CarlosAndres12 commented Jan 23, 2020

GDAL has a GeoPDF driver, so st_write should be able to write your data to GeoPDF

Yes but tmap allow to create more visually pleasant maps, with st_write you just get the raw raster/shape.

@Nowosad
Copy link
Member

Nowosad commented Mar 29, 2021

I would not think it would be possible to save tmap objects to GeoPDF in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants