[gdal-dev] Standardization of Bounding Box structure

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Standardization of Bounding Box structure

Roberto Ribeiro
In OGR, the GetGeometry() method from the Geometry class returns a bounding box in the (xmin, xmax, ymin, ymax) structure. However, the SetSpatialFilterRect() method from the Layer class expects a bounding box in the (xmin, ymin, xmax, ymax) structure. This is a problem that can be worked around, but it does generate confusion. Any reason why this couldn't be standardized?

Also, on a similar note, having SetSpatialFilterRect expect an array of coordinates, instead of coordinates as individual arguements, seems more logical to me, as it's how every other GIS package returns bounding box info afaik, including OGR's GetGeometry.

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Standardization of Bounding Box structure

Ari Jolma-2
Roberto Ribeiro kirjoitti 23.11.2017 klo 20:43:
In OGR, the GetGeometry() method from the Geometry class returns a bounding box in the (xmin, xmax, ymin, ymax) structure. However, the SetSpatialFilterRect() method from the Layer class expects a bounding box in the (xmin, ymin, xmax, ymax) structure. This is a problem that can be worked around, but it does generate confusion. Any reason why this couldn't be standardized?

There are also for example in gdal_translate also "xoff yoff xsize ysize", i.e., (xmin, ymin, xmax-xmin, ymax-ymin) and "ulx uly lrx lry", i.e., (xmin, ymax, xmax, ymin).

I guess the main reason is that changing the interface is a major change. So, perhaps this could be put on the list of things to consider changing in GDAL 3.0.

Ari


Also, on a similar note, having SetSpatialFilterRect expect an array of coordinates, instead of coordinates as individual arguements, seems more logical to me, as it's how every other GIS package returns bounding box info afaik, including OGR's GetGeometry.


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev