[gdal-dev] Bogus GeoJSON file or am I doing something wrong? (re-post)

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Bogus GeoJSON file or am I doing something wrong? (re-post)

Simon Eves
(re-posting as the first one ~2 weeks ago went into moderation quarantine due to attachment size and I don't know if it ever came out again, but certainly had no responses)

When our system imports (using GDAL) the attached GeoJSON file (of unknown provenance, via our QA team) the geo (California counties) ends up somewhere out in the Pacific and really small and slightly rotated.

I get the same results whether I import the file directly, or do a Shapefile or WKT CSV conversion with ogr2ogr first (forcing to EPSG:4326).

Is the file bogus, or is GDAL not interpreting the original coordinate system correctly?

This is all using GDAL 2.4.2, btw. We haven't made the leap to 3.x yet. Sorry.

--

Simon Eves
Senior Graphics Engineer, Rendering Group
OmniSci, 1 Front St. #2650, San Francisco, CA 94111, USA


Email: [hidden email] | Cell: 415.902.1996



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

us-ca-all.geo.json.gz (15K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Bogus GeoJSON file or am I doing something wrong? (re-post)

Even Rouault-2
On mardi 24 septembre 2019 11:52:22 CEST Simon Eves wrote:

> (re-posting as the first one ~2 weeks ago went into moderation quarantine
> due to attachment size and I don't know if it ever came out again, but
> certainly had no responses)
>
> When our system imports (using GDAL) the attached GeoJSON file (of unknown
> provenance, via our QA team) the geo (California counties) ends up
> somewhere out in the Pacific and really small and slightly rotated.
>
> I get the same results whether I import the file directly, or do a
> Shapefile or WKT CSV conversion with ogr2ogr first (forcing to EPSG:4326).
>
> Is the file bogus, or is GDAL not interpreting the original coordinate
> system correctly?

Its CRS and coordinate encoding is highly unstandard

"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:102243"}},"hc-
transform":{"default":{"crs":"+proj=lcc +lat_1=37.06666666666667
+lat_2=38.43333333333333 +lat_0=36.5 +lon
_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs","scale":
0.000665455608285,"jsonres":15.5,"jsonmarginX":-999,"jsonmarginY":
9851.0,"xoffset":1668099.76286,"yoffset":1116967.85109}}

EPSG:102243 doesn't exist. It is actually ESRI:102243 (the proj string above
is consistant with that)

But the main issue is the "transform" object that seems to describe a offset &
scaling strategy to encode coordinates as integer values. You'll have to
manually apply those corrections

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bogus GeoJSON file or am I doing something wrong? (re-post)

Simon Eves
OK, so it's a weird file.

I'll leave it to you to decide whether it's worth making GDAL/Proj deal with it. I suspect not, and that's fine with us.

Thanks!

Simon

On Tue, Sep 24, 2019 at 12:22 PM Even Rouault <[hidden email]> wrote:
On mardi 24 septembre 2019 11:52:22 CEST Simon Eves wrote:
> (re-posting as the first one ~2 weeks ago went into moderation quarantine
> due to attachment size and I don't know if it ever came out again, but
> certainly had no responses)
>
> When our system imports (using GDAL) the attached GeoJSON file (of unknown
> provenance, via our QA team) the geo (California counties) ends up
> somewhere out in the Pacific and really small and slightly rotated.
>
> I get the same results whether I import the file directly, or do a
> Shapefile or WKT CSV conversion with ogr2ogr first (forcing to EPSG:4326).
>
> Is the file bogus, or is GDAL not interpreting the original coordinate
> system correctly?

Its CRS and coordinate encoding is highly unstandard

"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG:102243"}},"hc-
transform":{"default":{"crs":"+proj=lcc +lat_1=37.06666666666667
+lat_2=38.43333333333333 +lat_0=36.5 +lon
_0=-120.5 +x_0=2000000 +y_0=500000 +ellps=GRS80 +units=m +no_defs","scale":
0.000665455608285,"jsonres":15.5,"jsonmarginX":-999,"jsonmarginY":
9851.0,"xoffset":1668099.76286,"yoffset":1116967.85109}}

EPSG:102243 doesn't exist. It is actually ESRI:102243 (the proj string above
is consistant with that)

But the main issue is the "transform" object that seems to describe a offset &
scaling strategy to encode coordinates as integer values. You'll have to
manually apply those corrections

--
Spatialys - Geospatial professional services
http://www.spatialys.com


--

Simon Eves
Senior Graphics Engineer, Rendering Group
OmniSci, 1 Front St. #2650, San Francisco, CA 94111, USA


Email: [hidden email] | Cell: 415.902.1996



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bogus GeoJSON file or am I doing something wrong? (re-post)

Even Rouault-2
On mercredi 25 septembre 2019 08:27:56 CEST Simon Eves wrote:
> OK, so it's a weird file.
>
> I'll leave it to you to decide whether it's worth making GDAL/Proj deal
> with it. I suspect not, and that's fine with us.

Would only be a GDAL only thing.
One single occurrence of such a file doesn't seem to be a very compelling
case.

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bogus GeoJSON file or am I doing something wrong? (re-post)

Simon Eves
I concur.

That said, I'm sure I have come across GeoJSON files with the integer/scale/offset encoding before. I figured that was a standard thing, but your response suggests otherwise.

That also said, I am digging through our stash of test files and I can't find any like that, so maybe I'm dreaming.

Some Googling seems to indicate that the "hc-transform" node might be something from HighCharts... starting here https://github.com/highcharts/highcharts/issues/7960

I'll let you know if I find anything more...

SE

On Wed, Sep 25, 2019 at 8:35 AM Even Rouault <[hidden email]> wrote:
On mercredi 25 septembre 2019 08:27:56 CEST Simon Eves wrote:
> OK, so it's a weird file.
>
> I'll leave it to you to decide whether it's worth making GDAL/Proj deal
> with it. I suspect not, and that's fine with us.

Would only be a GDAL only thing.
One single occurrence of such a file doesn't seem to be a very compelling
case.

--
Spatialys - Geospatial professional services
http://www.spatialys.com


--

Simon Eves
Senior Graphics Engineer, Rendering Group
OmniSci, 1 Front St. #2650, San Francisco, CA 94111, USA


Email: [hidden email] | Cell: 415.902.1996



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Bogus GeoJSON file or am I doing something wrong? (re-post)

Simon Eves
To wrap this up, I got in touch with HighCharts, and they confirmed that this file is from them, but not a real GeoJSON, and not expected to be usable outside their software ecosystem.

Thanks again.

SE


On Wed, Sep 25, 2019 at 8:47 AM Simon Eves <[hidden email]> wrote:
I concur.

That said, I'm sure I have come across GeoJSON files with the integer/scale/offset encoding before. I figured that was a standard thing, but your response suggests otherwise.

That also said, I am digging through our stash of test files and I can't find any like that, so maybe I'm dreaming.

Some Googling seems to indicate that the "hc-transform" node might be something from HighCharts... starting here https://github.com/highcharts/highcharts/issues/7960

I'll let you know if I find anything more...

SE

On Wed, Sep 25, 2019 at 8:35 AM Even Rouault <[hidden email]> wrote:
On mercredi 25 septembre 2019 08:27:56 CEST Simon Eves wrote:
> OK, so it's a weird file.
>
> I'll leave it to you to decide whether it's worth making GDAL/Proj deal
> with it. I suspect not, and that's fine with us.

Would only be a GDAL only thing.
One single occurrence of such a file doesn't seem to be a very compelling
case.

--
Spatialys - Geospatial professional services
http://www.spatialys.com


--

Simon Eves
Senior Graphics Engineer, Rendering Group
OmniSci, 1 Front St. #2650, San Francisco, CA 94111, USA


Email: [hidden email] | Cell: 415.902.1996




--

Simon Eves
Senior Graphics Engineer, Rendering Group
100 Montgomery St (5th Floor), San Francisco, CA 94104, USA


Email: [hidden email] | Cell: 415.902.1996



_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev