Tag Info

New answers tagged

1

This code (modified to include any datatype) uses the raster loaded directly as active Layer in QGIS (see next image): import sys, struct from osgeo import gdal from osgeo import gdalconst import os minLat = -48 maxLat = -33 minLong = 165 maxLong = 179 layer = iface.activeLayer() provider = layer.dataProvider() fmttypes = {'Byte':'B', 'UInt16':'H', ...


2

It is necessary to clarify that "l10g" is a DEM tile from the GLOBE website (Python Geospatial Development, p.120) and is a valid raster (raw elevation data). You must also download the hdr (l10g.hdr, book p.120 and explanations of Gabor Farkas) The l10g, l10g.hdr and histogram.py files should be in the same folder D:\Python\Progies\Geospatial\l10g\ To ...


1

There are three problems with your code/approach, which I would like to help to resolve in a quick and explicit manner: The raster data cannot be processed by the algorithm on its own. It needs a header file to access georeference information. Header files can be downloaded from here for the example dataset, as stated on page 120. You have to declare ...



Top 50 recent answers are included