-
Notifications
You must be signed in to change notification settings - Fork 14
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
Comment regarding circle in circular-geometry-objects.adoc proposal #135
Comments
Thank you for raising this topic. I do not have access to SQL/MM (only to drafts found on the web, the latest a CD from 2012), so I do not really know how circle is currently defined in SQL/MM. However, I am not aware of implementations of circle in DBMSs. I checked PostGIS, Oracle and Spatialite and did not find any indication of support for the geometry type. If that is the case, I think we should not include circle as a geometry type. A circle can be written as a closed circular string with two arcs. |
PostGIS does have support for circles. Not as a separate type, but as a special case of a circular string, see also https://postgis.net/docs/using_postgis_dbmanagement.html#CircularString. This approach is not (no longer) compliant to (the current edition of) SQL/MM though, see e.g. OSGeo/gdal#11750. Oracle also has support for circles (see e.g. https://docs.oracle.com/en/database/oracle/oracle-database/19/spatl/spatial-datatypes-metadata.html#GUID-5A7FCD16-E726-430F-91BE-56D7F7BAA359). An example (executed in an Oracle 19 database): WITH geometry AS (
SELECT
sdo_geometry (2003, -- 2D surface
NULL,
NULL,
sdo_elem_info_array (1, -- SDO_STARTING_OFFSET
1003, -- exterior polygon ring
4), -- circle
sdo_ordinate_array (-1,2,1,0,3,2)) -- coordinates
AS sdo
FROM
dual)
SELECT
sdo_util.to_wktgeometry(g.sdo) AS wkt,
sdo_util.to_gml321geometry(g.sdo) AS gml,
sdo_util.to_json(g.sdo) AS json
FROM
geometry g; The (formatted) output of the above query: WKT
GML <gml:Polygon gml:id="ID0001"
srsName="SDO:"
xmlns:gml="http://www.opengis.net/gml/3.2">
<gml:exterior>
<gml:Circle>
<gml:posList srsDimension="2">-1.0 2.0 1.0 0.0 3.0 2.0 </gml:posList>
</gml:Circle>
</gml:exterior>
</gml:Polygon> JSON {
"polygon": {
"boundary": [
{
"circle": {
"datapoints": [
[
1,
0
],
[
3,
2
],
[
1,
4
]
]
}
}
]
}
} |
OK, but this is not the |
Agree, the |
The current proposal states:
In GML, a circle is described as follows:
In SQL/MM (ISO/IEC 13249-3:2016), the text regarding type ST_Circle is almost the same as the text in the GML specification. The meaning is the same, the wording a bit different. Most importantly, a circle is also defined by three points.
Is it a good idea to deviate from the approach that both GML and SQL/MM take?
The text was updated successfully, but these errors were encountered: