I'm given:
- Extend of WMS Layer
- SRS
Now I want to, in standard 2.6 Python (no OGR or C lib dependencies), to generate a 100x100m random bounding box within that extent (assuming it is more than 100x100 itself).
I'm allowed to make the following HTTP requests of the following type (caching the results for reuse):
- http://spatialreference.org/ref/epsg/$SRS/proj4
But since I basically don't understand the contents of such files (e.g. proj4 etc), I have no idea whether it's even helpful in my computation.
To repeat what I want:
- A random 100x100m bounding box within the layer extend, with coordinates in the SRS
The code could look like this, when calling:
random_bbox = random_bbox(extent=[minx,miny,maxx,maxy], srs='epsg:25832', width_meters=100, height_meters=100)
So, how to do this, given this information, in "pure" python? I'm of course willing to write a heap of code, so just need some fairly precise hints.
Sorry if I missed some details, I'm making pancakes for my kids while writing this :-)