[postgis-devel] Adding 4D support to asGeoJson

Alexandre Lessard alessard at mapgears.com
Thu Feb 1 11:01:31 PST 2018


I would personnaly prefer to let the data decide for the number of 
dimensions returned, but if everyone asks for a switch I'll add it, but 
I have a question about the best way pass that switch from the beginning 
function to pointArray_to_geojson? By adding a new param like "bool 
hasm" to all the function call and all the parents and also in all the 
size functions or is there a better way to pass that kind of information 
through?

And for the function call directly in postgresql, do we want a 
ST_asGeoJson(integer gj_version, geography geog, integer 
maxdecimaldigits=15, integer options=0, boolean withmeasure=false) or a 
new function called something like ST_asGeoJsonM().

Thanks.

Alex


On 2018-01-31 16:41, Paul Ramsey wrote:
> alright.
>
>> On Jan 31, 2018, at 6:53 AM, Olivier Courtin <olivier.courtin at gmail.com> wrote:
>>
>> On Wed, Jan 31, 2018 at 2:32 PM, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
>>
>>
>>>> Maybe add an optional function argument to request the kind of
>>>> standard, as we have for WKT (ISO, OGC, Extended) ?
>> +1
>>
>>> What, and then strip out extra dimensions for ISO GeoJSON? That seems needlessly byzantine.
>>> If people are getting 4d geojson from their 4d objects, they can just force3d them before calling asgeojson.
>>> I don’t think the standards differ enough to be worth the extra cruft.
>> In fact, we already deal with dimensions in this export function,
>>
>> And for the ones who already use ST_AsGeoJSON with various dimensions
>> objects, including 4D,
>> it could lead to an unwanted behaviour change.
>>
>> O.
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/postgis-devel
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list