Kristin Cowalcijk created SEDONA-470:
----------------------------------------
Summary: Cannot distinguish between missing or null crs from the
result of geoparquet.metadata
Key: SEDONA-470
URL: https://issues.apache.org/jira/browse/SEDONA-470
Project: Apache Sedona
Issue Type: Bug
Reporter: Kristin Cowalcijk
Fix For: 1.6.0
geoparquet.metadata always gives crs = NULL no matter if the crs metadata field
is missing or is explicitly set to null. The result of running
{code}
spark.read.format("geoparquet.metadata").load("path/to/geoparquet").selectExpr("columns").show(10,
False)
{code}
is always
{code}
+------------------------------------------------------------+
|columns |
+------------------------------------------------------------+
|{geom -> {WKB, [Polygon], [0.0, 0.0, 1000.0, 1000.0], NULL}}|
+------------------------------------------------------------+
{code}
No matter if the geoparquet files has missing crs or having crs explicitly set
to null.
To better distinguish these cases, geoparquet.metadata should return an empty
string for missing crs fields, and returns "null" for crs fields explicitly set
to null.
For example, for geoparquet with missing crs metadata, the output should be:
{code}
+--------------------------------------------------------+
|columns |
+--------------------------------------------------------+
|{geom -> {WKB, [Polygon], [0.0, 0.0, 1000.0, 1000.0], }}|
+--------------------------------------------------------+
{code}
For geoparquet with crs explicitly set to null, the output should be:
{code}
+------------------------------------------------------------+
|columns |
+------------------------------------------------------------+
|{geom -> {WKB, [Polygon], [0.0, 0.0, 1000.0, 1000.0], null}}|
+------------------------------------------------------------+
{code}
For geoparquet with CRS, the output should be:
{code}
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|columns
|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|{geometry -> {WKB, [Polygon, MultiPolygon], [-180.0, -90.0, 180.0, 83.6451],
{"$schema":"https://proj.org/schemas/v0.5/projjson.schema.json","type":"GeographicCRS","name":"WGS
84 (CRS84)","datumEnsemble":{"name":"World Geodetic System 1984
ensemble","members":[{"name":"World Geodetic System 1984
(Transit)","id":{"authority":"EPSG","code":1166}},{"name":"World Geodetic
System 1984 (G730)","id":{"authority":"EPSG","code":1152}},{"name":"World
Geodetic System 1984
(G873)","id":{"authority":"EPSG","code":1153}},{"name":"World Geodetic System
1984 (G1150)","id":{"authority":"EPSG","code":1154}},{"name":"World Geodetic
System 1984 (G1674)","id":{"authority":"EPSG","code":1155}},{"name":"World
Geodetic System 1984
(G1762)","id":{"authority":"EPSG","code":1156}},{"name":"World Geodetic System
1984 (G2139)","id":{"authority":"EPSG","code":1309}}],"ellipsoid":{"name":"WGS
84","semiMajorAxis":6378137,"inverseFlattening":298.257223563},"accuracy":"2.0","id":{"authority":"EPSG","code":6326}},"coordinateSystem":{"subtype":"ellipsoidal","axis":[{"name":"Geodetic
longitude","abbreviation":"Lon","direction":"east","unit":"degree"},{"name":"Geodetic
latitude","abbreviation":"Lat","direction":"north","unit":"degree"}]},"scope":"Not
known.","area":"World.","bbox":{"southLatitude":-90,"westLongitude":-180,"northLatitude":90,"eastLongitude":180},"id":{"authority":"OGC","code":"CRS84"}}}}|
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)