[
https://issues.apache.org/jira/browse/SEDONA-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17708927#comment-17708927
]
Martin Andersson commented on SEDONA-272:
-----------------------------------------
There are some issues with the SpatialRDD based readers that can't be solved
easily. Since the row is encoded as a geometry with user data there is no way
to support data sources with null geometries. All fields except the geometry
are encoded as a tab separated string. That means that the all type information
is lost, there is no support for complex types like structs or maps and since
the values are not escaped your data will be messed up if it contains the tab
character.
I think that a Spark SQL data source for GeoJSON and Shape files would be much
more user friendly. Once we have them we could deprecate the SpatialRDD based
readers. A Spark SQL data source for GeoJSON could probably be implemented
without much work using the built-in JSON data source and ST_GeomFromGeoJSON.
> GeoJsonReader.readToGeometryRDD should handle GeoJSON documents missing
> geometry field
> --------------------------------------------------------------------------------------
>
> Key: SEDONA-272
> URL: https://issues.apache.org/jira/browse/SEDONA-272
> Project: Apache Sedona
> Issue Type: Improvement
> Reporter: Tomasz Taraś
> Priority: Minor
>
> Currently when document is missing geometry field NullPointerException is
> raised. While the GeoJSON spec says that document must have geometry key but
> allows geometry field to contain JSON null value I think we should handle
> both cases gracefully and read those rows as null geometry.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)