Modify

Opened 4 months ago

Closed 4 months ago

#14663 closed defect (duplicate)

Can't open geojson created by JOSM itself

Reported by: naoliv Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

I am reporting this against Plugin geojson, but I am unsure if it's not actually a problem in JOSM.
Open the attached example.osm file and then save it as a GeoJSON file.
Try to open that GeoJSON file:

2017-04-18 09:31:05.472 INFORMAÇÕES: Open file: /tmp/har/example.geojson (9813454 bytes)
2017-04-18 09:31:05.472 INFORMAÇÕES: Parsing GeoJSON: /tmp/har/example.geojson
2017-04-18 09:31:05.571 GRAVE: Error while reading json file!
2017-04-18 09:31:05.571 GRAVE: com.fasterxml.jackson.databind.JsonMappingException: Unexpected token (END_OBJECT), expected FIELD_NAME: missing property 'type' that is to contain type id  (for class org.geojson.GeoJsonObject)
 at [Source: /tmp/har/example.geojson; line: 253915, column: 13] (through reference chain: org.geojson.FeatureCollection["features"]->java.util.ArrayList[589]->org.geojson.Feature["geometry"])
com.fasterxml.jackson.databind.JsonMappingException: Unexpected token (END_OBJECT), expected FIELD_NAME: missing property 'type' that is to contain type id  (for class org.geojson.GeoJsonObject)
 at [Source: /tmp/har/example.geojson; line: 253915, column: 13] (through reference chain: org.geojson.FeatureCollection["features"]->java.util.ArrayList[589]->org.geojson.Feature["geometry"])
	at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:255)
	at com.fasterxml.jackson.databind.DeserializationContext.wrongTokenException(DeserializationContext.java:1061)
	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedUsingDefaultImpl(AsPropertyTypeDeserializer.java:147)
	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:99)
	at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:142)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:488)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:163)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:135)
	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:120)
	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:91)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeWithType(BeanDeserializerBase.java:1017)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:279)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:95)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:260)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:163)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:135)
	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:120)
	at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:91)
	at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:142)
	at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:42)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3807)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2691)
	at org.openstreetmap.josm.plugins.geojson.GeoJsonFileImporter.importData(GeoJsonFileImporter.java:39)
	at org.openstreetmap.josm.io.FileImporter.importDataHandleExceptions(FileImporter.java:91)
	at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.importData(OpenFileAction.java:350)
	at org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun(OpenFileAction.java:303)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95)
	at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

QGIS seems to properly read the GeoJSON file however.

JOSM:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-04-17 23:55:53 +0200 (Mon, 17 Apr 2017)
Build-Date:2017-04-18 01:33:31
Revision:11950
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11950 pt_BR) Linux Debian GNU/Linux 9.0 (stretch)
Memory Usage: 475 MB / 10206 MB (208 MB allocated, but free)
Java version: 1.8.0_121-8u121-b13-4-b13, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-8-jre:amd64-8u121-b13-4
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugins:
+ Create_grid_of_ways (32699)
+ FastDraw (33182)
+ ImportImagePlugin (33028)
+ OpeningHoursEditor (33185)
+ PicLayer (33148)
+ RoadSigns (33204)
+ SimplifyArea (33004)
+ apache-commons (32994)
+ buildings_tools (33004)
+ conflation (0.5.4)
+ contourmerge (1030)
+ download_along (32946)
+ editgpx (33004)
+ ejml (32680)
+ geojson (52)
+ geotools (33042)
+ importvec (33088)
+ indoorhelper (33088)
+ jts (32699)
+ log4j (32699)
+ measurement (33088)
+ merge-overlap (33154)
+ opendata (33245)
+ pbf (33241)
+ pdfimport (33004)
+ poly (33004)
+ reverter (33088)
+ scripting (30764)
+ tageditor (33021)
+ todo (30100)
+ turnlanes (33088)
+ turnlanes-tagging (254)
+ turnrestrictions (33088)
+ undelete (33263)
+ utilsplugin2 (33212)

Attachments (2)

example.geojson (9.4 MB) - added by naoliv 4 months ago.
example.osm (8.4 MB) - added by naoliv 4 months ago.

Change History (3)

Changed 4 months ago by naoliv

Attachment: example.geojson added

Changed 4 months ago by naoliv

Attachment: example.osm added

comment:1 Changed 4 months ago by Klumbumbus

Component: Plugin geojsonCore
Owner: changed from Larry0ua to team
Resolution: duplicate
Status: newclosed

Closed as duplicate of #10564.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.