New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WKT syntax for rectangles #36
Comments
It seems instead to be a bounding-box function: http://www.postgis.org/docs/Box2D.html |
Ah, I should maybe have done a bit more reading on the PostGIS documentation. I just saw threads where users were using BOX2D strings in their queries. Looking at the geotoolkit documentation for Envelopes: The parseWKT accepts both:
The toWKT outputs:
|
I've now taken a look at the PostGIS documentation, and have noticed the Box2D is not just a function, but also a type: http://www.postgis.org/docs/box2d_type.html From what I saw I think the box types in PostGIS (Box2D/Box3D) can be cast to/from strings in the |
WKT syntax for rectangles was added with this commit: spatial4j/spatial4j@198dc13 I'll leave this issue open until I add BOX & BOX2D. |
I agree, I don't like the argument order either. Thanks for pointing out the ENVELOPE syntax in the Catalogue Services Specification though, that's useful to know. :) |
I'm not really seeing much out support out there for BOX & BOX2D. The geotoolkit.org links you have no longer show the WKT methods you refer to, and I wonder who uses geotoolkit any way. In PostGIS, it isn't apparent in the documentation at all that BOX & BOX2D are parseable WKT (even if you may happen to know that is so). I haven't tried. Do you believe it is and people use it? So I'm inclined to pass on BOX/BOX2D for now. I don't know if I should close the issue based on satisfying the title of the issue, or rename the title to have BOX & BOX2D. |
The BOX/BOX2D/BOX3D syntax seems to be supported in PostGIS, but I think maybe only in some (not all) scenarios. I think the ENVELOPE syntax you have introduced is sufficient, especially given it is from one of the OGC specifications. I'll close this issue, and will consider reopening in the future if I find wider usage of the BOX syntax. |
Support should be added for the following WKT syntax. I don't think it's defined in any standard, but several existing GIS libraries/systems already support this syntax (including PostGIS and Geotoolkit).
BOX2D(-180.0 -90.0, 180.0 90.0)
The text was updated successfully, but these errors were encountered: