Changes between Version 6 and Version 7 of RFC59-Draft


Ignore:
Timestamp:
Aug 6, 2010, 9:49:01 AM (14 years ago)
Author:
sdlime
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RFC59-Draft

    v6 v7  
    112112}}}
    113113
    114 Which converts area from sq. meters to acres, truncates the result to two decimal places adds commas (213234.123455 => 213,234.12) for crowd pleasing display.
     114Which converts area from sq. meters to acres, truncates the result to two decimal places adds commas (213234.123455 => 213,234.12) for crowd pleasing display. To add this support, in addition to grammar changes, we add these declarations to mapserver.h:
     115
     116{{{
     117enum MS_PARSE_RESULT_TYPE_ENUM { MS_PARSE_RESULT_BOOLEAN, MS_PARSE_RESULT_STRING, MS_PARSE_RESULT_SHAPE };
     118
     119typedef union {
     120  int intval;
     121  char *strval;
     122  shapeObj *shpval;
     123} parseResultObj;
     124}}}
     125
     126Then in the grammar we set a parse result type and set the result accordingly. One side effect is that we have to define a standard way to convert numbers to strings when in the string context and simply using "%g" as a format string for snprintf does wonders to output.
     127
     128We can also extend the parser to output shapeObj's and I could see this manifesting itself via the GEOMTRANSFORM mechanism already in place. It would be relatively easy to add many of the GEOS supported operators to the grammar and expose them this way. Buffering would be an obvious candidate.
     129
     130== Expression Use Elsewhere ==
    115131
    116132
    117 == Expression Use Elsewhere ==
    118133
    119134== Backwards Compatibility Issues ==