0
votes
1answer
24 views

How to determine bounding box of current qgis 'map canvas extent' from the python console

I've asked a similar question here: How to quickly calculate bounding box coordinates of a selected polygon with qgis ...regarding a quick way to determine the bounding box of a given layer. Is ...
3
votes
3answers
404 views

Python - Find the largest extent in a list of extents (tuple format)

I am trying to find a way (simplest is the best) to retrieve the largest extent in a list of tuple extents in python. The list is looking like that: extents = [(-180.0, -90.0, 180.0, 83.624), ...
1
vote
1answer
75 views

Equivalent function to shapely's envelope in ogr?

I wrote a very simple python function that gives me the envelope/bounding box/...based on two coordinate pairs (ower left and upper right corner): # ... def get_bounding_box(self, ll_corner, ...
0
votes
2answers
195 views

Can you change the processing extent in environment settings using python to a shapefile?

I have managed to do this manually at Geoprocessing>Environments>Processing Extent and setting the shapefile in the drop down bar. I was wonder if this could be automated with a python script? My ...
1
vote
2answers
107 views

Using python to get extent and split coordinates into list

I have the following code: for fc in fcs: desc = arcpy.Describe(fc) ext = desc.extent ext.split(" ") print ext I'm getting error: AttributeError: Point: Get attribute split does not ...
0
votes
1answer
42 views

How to find zoom levels based on a given bounding box in srs 4326?

I need a function that outputs Zoom Level of a bounding box. for example imagine this bbox: 38.056640499272,22.412109500728,67.060546749272,36.91406262572 How can I found the level?
3
votes
2answers
154 views

Using python to Raster clip the extent to be the same as the display?

I've been trying to figure this out for almost a week now. I am creating a tool which first needs the raster to be clipped out to the current display. I have tried all sorts of things. Below is the ...
0
votes
0answers
57 views

Best way to group datasets by country/region

I 'm using ArcGIS 10.0 and have a folder with misc GIS datasets from all over the world. I wrote a script that finds all of these datasets and writes them to a .csv file, but I also want to identify ...
0
votes
1answer
56 views

Retrieving raster/coverage width and height in pixels from GeoServer

Is it possible to retrieve the original width and height in pixels for a coverage in GeoServer using either the Python API or REST? I could not find anything in the documentation regarding how to ...
0
votes
1answer
425 views

How to obtain an extent of a whole shapefile?

I have got two shapefiles. One of them is a point shapefile and the second one is a polygon shapefile. I need to find out which of them has a larger extent and then set the environment extent to ...
1
vote
1answer
127 views

Raster extent, just clipped by geomtery, slightly differs from a given geometry

The raster using arcgis geoprocessing is cliped with a feature, reading it's geometry and as a result, rasters extent slightly differs. Extent of geom: str(row.shape.extent) '570600,537958652 ...
1
vote
3answers
147 views

Center of a bounding box

I have bounding box coordinates of my shapefile (fetched from layer.GetExtent() Python with GDAL/OGR): (-38.6102467739459, -38.017601026186576, 33.01563382506067, 33.624945228091406) So I assume ...
1
vote
1answer
150 views

How to set a spatial filter with Python/GDAL?

Is there a way with GDAL (Python) to set a spatial filter (bounding-box) on a raster before I process it? I want to read it as an array. BandReadAsArray(band, xoff=0, yoff=0, win_xsize=None, ...
1
vote
4answers
401 views

Get vector features inside a specific extent

The problem: I have a very large vector layer with many features and a much smaller raster layer in a defined region. I want to get only those vector features which are within the raster layers ...
5
votes
3answers
937 views

How do I extract a raster's extent in python?

I am looking for an easy way to extract a raster's extent in python. Currently, I am using gdalinfo and then parsing out the corner coordinates. The problem with this approach is that gdalinfo is ...