[postgis-devel] Cast GeoJSON to geometry like with WKT

Paul Ramsey pramsey at cleverelephant.ca
Fri Mar 6 09:19:35 PST 2020



> On Mar 6, 2020, at 9:15 AM, Darafei Komяpa Praliaskouski <me at komzpa.net> wrote:
> 
> Please check what will "{" mean in non-hex WKB, EWKB and make sure it's forbidden on serialization for them. Also JSON may probably have leading whitespace, so check same for tab, space and magic unicode whitespace too? 
> I'm okay with it otherwise. 

The only text formats we read are HEXEWKB, HEXWKB, EWKT AND WKT. So there’s no ‘{‘ in any of them. I’m loath to trim white, as that adds to the overhead of each read, if one is going to feed JSON to the thing one should have the good sense to trim it one’s self (we don’t white trip WKT or HEXWKB)

P

> 
> пт, 6 сак 2020, 19:32 карыстальнік Paul Ramsey <pramsey at cleverelephant.ca> напісаў:
> 
> > On Mar 6, 2020, at 2:55 AM, Felix Kunde <felix-kunde at gmx.de> wrote:
> > 
> > So probably geometry(text) just needs to be able to understand GeoJSON, too.
> 
> Correct, it would involve automagically detecting another text format. Probably not that expensive (if it doesn’t start with ‘{‘ it isn’t JSON) but… I’m not sure what the “but” is. Catastrophists, tell me why and how this would break things?
> 
> P
> _______________________________________________
> 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