It’s important that different datasets are compatible with each-other prior to analysis.
- All datasets should be in the same CRS (datum and projection)
- Rasters should be “co-registered”: matching grids (resolution and orientation)
- Optional: Don’t keep data you don’t need
- Change to data model (raster <-> vector)
Generation of a new sample from existing data.
Raster grids will not always align, even in the same projection & datum.
Change the frequency/density of verticies in lines and polygons
Reprojection (via PyGIS)
When raster data is reprojected, data points are usually not mapped 1:1.
A “warped” reprojection (via PyGIS)
Vector reprojection only affects vertices / points.
Weird things happen at the edges!
- Vector geometry can become invalid.
- Raster data can show a “seam” where edges are warped together.
A “seam” along 180 degrees longitude in QGreenland’s Natural Earth basemap
Consider doing a subset first. Don’t waste time and computing power doing analysis on areas you don’t care about!
QGreenland’s Natural Earth 2 basemap without subsetting. QGreenland’s area of interest is the tiny circle in the center!
gdal_rasterize, gdal_polygonize.py, gdal_contour
Does your data provide a suitable representation for your analysis?
Johannes Rössel, CC BY-SA 3.0 https://creativecommons.org/licenses/by-sa/3.0, via Wikimedia Commons
Conversion: Raster to vector
QGreenland’s Heat Flux layer (raster) with contours overlaid
General transformation pitfalls
- Some metadata in the source data may be carried over to the output. Use tools like
ogrinfo to inspect your metadata before publishing.