Research

The research module will act as a container for functionality to investigate datasets, pretty much like QGIS users might be used to in the Vector/Reseach Tools menue.

So far restricted to a single function, hopefully more to come.

class ogr_utils.research.Research

Research class as in the QGIS Vector/Reseach Tools menue.

get_bounding_box(ll_corner, ur_corner)
Parameters:
  • ll_corner – lower left xy-coordinates as tuple or list
  • ur_corner – upper right xy-coordinates as tuple or list

Based on the coordinates of the lower left and upper right corner this method will return an ogr geometry object of the corresponding bounding box. Default it will use shapely‘s envelope function. If this fails it will create the bounding box polygon using ogr.

Example

Get the geomtry of an evelope by it’s lower left and upper right corner:

from ogr_utils.research import Research
prof = Research()
xy1 = (4.84692,52.3706)
xy2 = (4.84397,52.36611)
bb = prof.get_bounding_box( [xy1,xy2] )

Table Of Contents

Previous topic

Geometry

Next topic

<no title>

This Page