TransWikia.com

QGIS- Output bmp files are tilted

Geographic Information Systems Asked by syd wat on January 12, 2021

I am new to QGIS. My goal has been to convert a .shp file to a raster, eventually to a .bmp for an input map into a separate piece of software I am using… this separate software also needs the map to be in UTM.
My steps after inputting vector layer:

  1. Change CRS from Conus Albus to WGS 84 / UTM.
  2. Use Rasterize… Conversion- Vector to Raster (using Byte as the output data type)
  3. Raster…Conversion- Translate (Convert Format)- Save to File- BMP

When I open this .bmp from my desktop (viewing in XnView or Windows Photos) the .bmp is severely tilted to the right…

I must be missing something simple? Any advice?enter image description here
enter image description here

Second photo is the output.

One Answer

QGIS uses gdal_rasterize command to convert vector to raster. It cannot reproject between spatial reference systems (SRS). So your first step has no effect. Your third step uses gdal_translate to change output format which cannot reproject to target SRS, too. Your steps should be:

  1. Vector to raster conversion of the layer (it keeps the source SRS) into GeoTiff memory layer
  2. Export/Save as your memory layer into a GeoTiff file, change the target SRS too.
  3. Raster/Conversion/Translate save into a BMP file (it also keeps SRS)

Finally you get two files a BMP and an aux.xml (for georeference). If you need a world file georeference (e.g. bpw or wld) for your target software add creation option WORLDFILE=YES:

enter image description here

If you reproject your data it is natural to have rotation if the orientation of the two SRS are not the same. Check your BMP in QGIS!

Answered by Zoltan on January 12, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP