[pdal] boundary json coordinate order for geographic

Kirk Waters - NOAA Federal kirk.waters at noaa.gov
Wed Feb 23 04:35:35 PST 2022


Hi,
I've been using pdal info --boundary to generate bounds for datasets. I
take the boundary_json element and feed it to ogr2ogr to use for clipping.
That has worked well. However, if the data is in geographic, the
coordinates get flipped. Instead of xy, the entries are lat lon. For
example (in Florida):

{"type": "MultiPolygon", "coordinates": [[[[26.0972695, -80.41166909], ...

That seems like it would match with the GDAL expectation since GDAL 3
honors by default authority (EPSG) axis order, so that means lat/lon for
geographic CRS. But I think it conflicts with GeoJSON in the spec section
3.1.1 <https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.1>. In any
case, when I convert that JSON of the bounds with something like:

ogr2ogr -a_srs EPSG:4759 bounds.gpkg bounds.json

I'll get the order flipped and it will be south of Africa instead of in
Florida. If I flip all the coordinates in the json and then run it through
ogr2ogr, it lands in the right place. Is this a PDAL issue or am I just
doing something wrong?

Kirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pdal/attachments/20220223/237a8153/attachment.html>


More information about the pdal mailing list