Changes between Initial Version and Version 1 of rfc60_improved_roundtripping_in_ogr


Ignore:
Timestamp:
Sep 23, 2015, 7:14:40 AM (9 years ago)
Author:
Even Rouault
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rfc60_improved_roundtripping_in_ogr

    v1 v1  
     1= RFC 60 : Improved round-tripping in OGR =
     2
     3Author: Even Rouault[[BR]]
     4
     5Contact: even.rouault at spatialys.com[[BR]]
     6
     7Status: Development[[BR]]
     8
     9Implementation version: 2.1
     10
     11== Summary ==
     12
     13This RFC defines how to improve better round-tripping in conversion of vector formats, in particular for GeoJSON extensions.
     14
     15== Rationale ==
     16
     17Some formats have concepts that are not well modeled by the OGR abstraction, but that are desirable to be preserved in transformation scenarios involving reprojection, spatial/attribute filtering, clipping, etc... where the target format is the source format.
     18
     19Various extensions exist above the core GeoJSON specification: at the FeatureCollection, Feature or Geometry levels. See https://github.com/mapbox/carmen/blob/master/carmen-geojson.md, https://github.com/geocoders/geocodejson-spec/blob/master/draft/README.md or https://github.com/geojson/draft-geojson/issues/80#issuecomment-138037554 for a few examples.
     20
     21== Changes ==
     22
     23=== OGRFeature ===
     24
     25Two new members will be added to the OGRFeature class, nativeData (string) and nativeMediaType (string). nativeData will contain the representation (or part of the representation) of the original feature, and nativeMediaType the [https://en.wikipedia.org/wiki/Media_type media type]
     26
     27Thus, in the GeoJSON case, nativeData would contain  the full serialization of a GeoJSON Feature. nativeMediaType would be set to "application/vnd.geo+json"
     28The writer side of the GeoJSON driver would start from the nativeData if present (and if nativeMediaType = "application/vnd.geo+json", replace its properties member with the content of the OGR fields and patch its geometry to include additional JSON objects.
     29
     30=== OGRLayer ===
     31
     32A dedicated metadata domain "NATIVE_DATA" in which there would be a "NATIVE_DATA" and "NATIVE_MEDIA_TYPE" items would be used. In the GeoJSON case, this would contain JSON members at the FeatureCollection level (excluding the features array of course).
     33
     34== C API ==
     35
     36The following functions will be added:
     37
     38{{{
     39const char CPL_DLL *OGR_F_GetNativeData(OGRFeatureH);
     40void OGR_F_SetNativeData(OGRFeatureH, const char*);
     41const char CPL_DLL *OGR_F_GetNativeMediaType(OGRFeatureH);
     42void OGR_F_SetNativeMediaType(OGRFeatureH, const char*);
     43}}}
     44
     45== SWIG bindings (Python / Java / C# / Perl) changes ==
     46
     47The new functions will mapped to SWIG.
     48
     49== Drivers ==
     50
     51The GeoJSON driver will be modified to implement this RFC.
     52
     53Other drivers like ElasticSearch and MongoDB drivers, that use a _json OGR field
     54for round-tripping could potentially be upgraded to benefit from the mechanism of this RFC.
     55
     56== Utilities ==
     57
     58ogr2ogr will be modified to automatically copy nativeData at layer and feature level. A -noNativeData flag
     59will be added to avoid doing so, when this is not desirable.
     60
     61== Documentation ==
     62
     63All new methods/functions are documented.
     64
     65== Test Suite ==
     66
     67The GeoJSON and ogr2ogr related tests will be extended
     68
     69== Compatibility Issues ==
     70
     71Nothing severe expected. Potentially existing scripts might need to add -noNativeData to get previous behaviour.
     72
     73== Related ticket ==
     74
     75https://trac.osgeo.org/gdal/ticket/5310
     76
     77== Implementation ==
     78
     79The implementation will be done by Even Rouault (Spatialys) and be sponsored by Mapbox.
     80
     81== Voting history
     82
     83TBD