NoiseCapture icon indicating copy to clipboard operation
NoiseCapture copied to clipboard

Can not read GeoJSON file when exported

Open gpetit opened this issue 7 years ago • 2 comments

Not sure this problem is due to NoiseCapture App.

I made a noise measure (see : http://onomap.noise-planet.org/#17/47.56919/-3.02365) with NoiseCapture V0.4.3 (Beta) 18 oct 2016 r.08e72c1.

Then, I exported this track in order to obtain the GeoJSON file (track.zip).

Now, I want to open this "track.geojson" into OrbisGIS V5.1

Even if I make the instructions below, I obtain these error messages

  • Geocatalog / Add / File / track.geojson
Cannot import the file.
Cause : Malformed GeoJSON file. Expected 'FeatureCollection', found '['
  • Geocatalog / Import / File / track.geojson
  • CALL GeoJsonRead('/home/gpetit/Téléchargements/track/track.geojson', 'TOTO');
Execute request 1/1: CALL GeoJsonRead('/home/gpetit/Téléchargements/track/track.geojson', 'NEW_DATA')
Malformed GeoJSON file. Expected 'FeatureCollection', found '['; SQL statement:
CALL GeoJsonRead('/home/gpetit/Téléchargements/track/track.geojson', 'TOTO') [0-192]

I tried to import this file into QGis, and it works well.

So maybe this issue is due to OrbisGIS ?

@ebocher @nicolas-f @SPalominos

gpetit avatar Nov 01 '16 19:11 gpetit

Just to complete.

In QGis, I exported the GeoJSON file into a shape file (called NOISE.shp). Then, when I import this shp in OrbiSGIS, I have this error message

Cannot import the file.
Cause : INSERT INTO "NOISE" VALUES (DEFAULT, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
null

If I just add the shp, I have an empty table

gpetit avatar Nov 03 '16 10:11 gpetit

Qgis and OrbisGIS does not handle null in coordinates (for z values) OrbisGIS expect an order in GeoJSon attributes (type and then features)

I could fix the point Z. I have to change the parse script also.

nicolas-f avatar Apr 03 '17 14:04 nicolas-f