Tag Info

New answers tagged

1

Working in person with a friend, I think I figured it out. It turns out you can save the commands in a .bat file and just type that file into the prompt in the OSGeo4W shell. This works without setting any path. ** The catch, is that it seems that commands like otbcli_ComputeImagesStatistics are themselves batch calls, so if I put more than one of them in ...


4

The following script determines the bounding box of a raster and creates based on the bounding box a geometry. import ogr, gdal raster = gdal.Open('sample.tif') vector = ogr.Open('sample.shp') # Get raster geometry transform = raster.GetGeoTransform() pixelWidth = transform[1] pixelHeight = transform[5] cols = raster.RasterXSize rows = raster.RasterYSize ...


0

You can tell python where to look for additional libraries (e.g. GDAL) by adding their location to the PYTHONPATH. To do this you will need privileges on your machine to edit system variables and know the exact location of your GDAL python package. The process of changing the PYTHONPATH is outlined here: Add to PYTHONPATH on Windows 7



Top 50 recent answers are included