Opened 7 years ago
Closed 6 years ago
#3409 closed defect (fixed)
d.what.vect JSON issue with OSM data
Reported by: | neteler | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.6.2 |
Component: | Display | Version: | svn-releasebranch72 |
Keywords: | d.what.vect, v.what | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
I have imported successfully an OSM pbf file, can display it but not query:
ScriptError(_("v.what output is not valid JSON format:
(screenshot attached since the error cannot be copy-pasted, no text selection possible)
To reproduce:
# (51MB) wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf grass72 -c epsg:4326 ~/grassdata/latlong_wgs84 v.in.ogr input=berlin-latest.osm.pbf type=point,line output=roads g.region vector=roads -p d.mon wx0 # same issue with g.gui d.vect roads d.what.vect roads # --> JSON error
Here an example for v.what output not parsable by d.what.vect (note: this is not exactly the same position as in the error msg screenshot):
v.what roads coordinates=13.3926375553,52.5548668929 -a East: 13:23:33.495199E North: 52:33:17.520814N ------------------------------------------------------------------ Map: roads Mapset: osm Type: Point Id: 34721 Layer: 1 Category: 34721 Driver: sqlite Database: /home/mneteler/grassdata/latlong_wgs84/osm/sqlite/sqlite.db Table: roads_1 Key column: cat cat : 34721 osm_id : 631984925 name : barrier : highway : ref : address : is_in : place : man_made : other_tags : "addr:city"=>"Berlin","addr:street"=>"Bornholmer Straße","addr:suburb"=>"Gesundbrunnen","addr:country"=>"DE","addr:postcode"=>"13359","addr:housenumber"=>"50"
Some more "escaping" might be needed here?
Attachments (1)
Change History (9)
by , 7 years ago
Attachment: | gui_query_json_error_OSM.png added |
---|
comment:1 by , 7 years ago
Replying to neteler:
I have imported successfully an OSM pbf file, can display it but not query:
[...]
Here an example for v.what output not parsable by d.what.vect (note: this is not exactly the same position as in the error msg screenshot):
v.what roads coordinates=13.3926375553,52.5548668929 -a East: 13:23:33.495199E North: 52:33:17.520814N ------------------------------------------------------------------ Map: roads Mapset: osm Type: Point Id: 34721 Layer: 1 Category: 34721 Driver: sqlite Database: /home/mneteler/grassdata/latlong_wgs84/osm/sqlite/sqlite.db Table: roads_1 Key column: cat cat : 34721 osm_id : 631984925 name : barrier : highway : ref : address : is_in : place : man_made : other_tags : "addr:city"=>"Berlin","addr:street"=>"Bornholmer Straße","addr:suburb"=>"Gesundbrunnen","addr:country"=>"DE","addr:postcode"=>"13359","addr:housenumber"=>"50"Some more "escaping" might be needed here?
Alternatively you can use a osmconf.ini file http://gdal.org/drv_osm.html to 1) avoid the creation of the other_tags field, 2) select some of the OSM keys summarized in the other_tags field.
comment:4 by , 7 years ago
Milestone: | → 7.2.4 |
---|
comment:6 by , 6 years ago
comment:8 by , 6 years ago
Milestone: | 7.2.4 → 7.6.2 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Tested in 7.6 and trunk, working now. Closing.
d.what.vect error message (copy-paste not possible unfortunately)