Changes between Version 35 and Version 36 of rfc61_support_for_measured_geometries


Ignore:
Timestamp:
Feb 3, 2016, 5:23:47 AM (8 years ago)
Author:
Ari Jolma
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • rfc61_support_for_measured_geometries

    v35 v36  
    2525New OGRwkbGeometryType values are needed. SFSQL 1.2 and ISO SQL/MM Part 3 will be used, i.e., 2D type + 2000 for M and  2D type + 3000 for ZM. (Also types such as Tin and !PolyhedralSurface types can be added for completeness, even if unimplemented currently)
    2626
    27 On a more general note, there could be a path to using a clean set of values and have legacy support as an exception. I'm proposing to define aliases for legacy *25D values to have a uniform set of values. Are there any problems with that?
     27On a more general note, there could (should?) be a path to using a clean set of values and have legacy support as an exception.
    2828
    2929Abstract types are defined and not part of the enum.
     
    6767    wkbTINZM = 3016,                /**< ISO SQL/MM Part 3. GDAL &gt;= 2.1 */
    6868
    69 // define aliases
    70 #define wkbPointZ wkbPoint25D
    71 ...
    7269
    7370// define new abstract types (why? what's the difference to the enum values? - at least they do not need to be handled in switches)
     
    7976#define wkbSurfaceZM        ((OGRwkbGeometryType)3014)      /**< ISO SQL/MM Part 3. GDAL &gt;= 2.1 */
    8077
     78// add tests for M
     79#define wkbHasM(x)     OGR_GT_HasM(x)
     80#define wkbSetM(x)     OGR_GT_SetM(x)
     81
     82OGRwkbGeometryType CPL_DLL OGR_GT_SetM( OGRwkbGeometryType eType );
     83int                CPL_DLL OGR_GT_HasM( OGRwkbGeometryType eType );
     84       
     85
    8186}}}
    8287
     
    8893#define OGR_G_3D 0x2
    8994#define OGR_G_MEASURED 0x4
    90 }}}
     95#define OGR_G_IGNORE_MEASURED 0x8
     96}}}
     97The "ignore" flag is needed internally for backwards compatibility.
    9198
    9299Currently a hack to set nCoordDimension negative is used to denote an empty point.
     
    126133OGRBoolean IsMeasured();
    127134
    128 //Add methods (non-standard, may cause internal changes, e.g., allocate memory for Z or M values; note the use of one method instead of second unset* method):
     135//Add methods (non-standard; note the use of one method instead of second unset* method):
    129136virtual void set3D(OGRBoolean bIs3D);
    130137virtual void setMeasured(OGRBoolean bIsMeasured);
     138int getFlags() const;
     139int setFlags( int newFlags ) const;
    131140
    132141//Add now or later methods:
     
    143152Add property double m to class OGRPoint. Add constructor, getters, and setters for it.
    144153
    145 Add property double *padfM to class OGRSimpleCurve. Add constructor, getters, and setters for it. New setters with postfix M are needed for XYM data since the object may be upgraded to XYZ from XY in setters.
     154Add property double *padfM to class OGRSimpleCurve. Add constructor, getters, and setters for it. New setters with postfix M are needed for XYM data since the object may be upgraded to XYZ from XY in setters. Add also methods RemoveM() and AddM() with similar semantics as Make3D and Make2D.
    146155
    147156Override methods set3D and setMeasured in those classes where setCoordinateDimension is overridden.
     
    203212                                 double* padfM);
    204213}}}
     214Use of padfM requires changes to openfilegdb driver.
    205215
    206216=== GEOS, filters, and other issues ===
     
    213223
    214224The new C API functions need to be exposed through swig. Further changes depend on whether the language bindings are aware of coordinates. At least Python and Perl are.
     225
     226The new geometry types will be included into the i files.
     227
     228Some new setters and getters are needed for M. Is3D, IsMeasured, Set3D and SetMeasured methods should be added. Also OGR_GT_HasM.
    215229
    216230== Drivers ==