Created
September 6, 2023 20:41
-
-
Save atlantageek/27d40309c23a3312e6985c16ca430ab6 to your computer and use it in GitHub Desktop.
Generating a png from a wms map and a geojson object.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% gdal_translate -of GTiff -projwin -83.55 34.55 -83.44 34.44 -projwin_srs WGS84 -outsize 1024 1024 frmt_wms_openstreetmap_tms.xml openstreetmap.tif | |
Input file size is 67108864, 67108864 | |
0...10...20...30...40...50...60...70...80...90...100 - done. | |
% gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 0 -burn 0 source.geojson openstreetmap.tif | |
0...10...20...30...40...50...60...70...80...90...100 - done. | |
% gdal_translate -of PNG -ot Byte -colorinterp red,green,blue openstreetmap.tif openstreetmap.png | |
Input file size is 1024, 1024 | |
0...10...20...30...40...50...60...70...80...90...100 - done. | |
tommiejones@Tommies-MacBook-Pro gdal_experiments % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment