﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
17453	[PATCH] GeoJSON export error	BrackoNe	team	"Hi all,

We have a problem in the process of exporting GeoJSON files using **geojson (version 116)**.

If you try to export any polygon/area (closed way) to geojson it saves to LineString instead to Polygon. If I open GeoJSON file which I have exported from QGIS and it has following part:
{{{
#!json
{""type"":""Feature"",""geometry"":{""type"":""Polygon"",""coordinates"":[]...}
}}}
it works well.
However, if you try to re-save the same file from JOSM, it will automatically save to LineString.

I'm trying to fix some lakes and forests, but as soon as I export geometry, it messes everything because this conversion.

Can you fix this issue or tell me how to bypass this problem?

Thanks in advance,
Nemanja

==== Please provide any additional information below. Attach a screenshot if possible.

{{{
URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-12-31 15:09:58 +0100 (Mon, 31 Dec 2018)
Build-Date:2018-12-31 14:24:10
Revision:14620
Relative:URL: ^/trunk

Identification: JOSM/1.5 (14620 en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 1803 (17134)
Memory Usage: 1581 MB / 1820 MB (654 MB allocated, but free)
Java version: 1.8.0_144-b01, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 2560x1440, \Display1 2560x1440
Maximum Screen Size: 2560x1440
Dataset consistency test: No problems found

Plugins:
+ FastDraw (34867)
+ Mapillary (1.5.18)
+ RoadSigns (34867)
+ apache-commons (34506)
+ apache-http (34632)
+ buildings_tools (34904)
+ ejml (34389)
+ geojson (116)
+ geotools (34513)
+ imagery_offset_db (34867)
+ jaxb (34678)
+ jna (34867)
+ jogl (1.2.2)
+ jts (34524)
+ kendzi3d (1.0.205)
+ kendzi3d-resources (0.0.2)
+ log4j (34527)
+ mbtiles (a3e491d)
+ measurement (34867)
+ microsoft (1535663476)
+ opendata (34911)
+ splinex (34901)
+ tageditor (34867)
+ turnlanes (34678)
+ turnlanes-tagging (280)
+ turnrestrictions (34867)
+ utilsplugin2 (34915)

Tagging presets:
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/RS.zip

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
+ https://pasharm.github.io/New_basic_style_for_JOSM/New_basic_style.mapcss
- %UserProfile%\Desktop\TrafficSigns_edited2.zip
+ %UserProfile%\Desktop\beta_style_josm-master.zip
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_EUR_OR.zip
+ %UserProfile%\Desktop\Microsoft-TurnRestriction.mapcss

Last errors/warnings:
- E: Error while reading json file!
- E: java.lang.ClassCastException: Cannot cast org.glassfish.json.JsonNumberImpl$JsonBigDecimalNumber to javax.json.JsonArray
- E: Error while reading json file!
- E: java.lang.ClassCastException: Cannot cast org.glassfish.json.JsonNumberImpl$JsonBigDecimalNumber to javax.json.JsonArray
- E: Error while reading json file!
- E: java.lang.ClassCastException: Cannot cast org.glassfish.json.JsonNumberImpl$JsonBigDecimalNumber to javax.json.JsonArray
- E: Error while reading json file!
- E: java.lang.ClassCastException: Cannot cast org.glassfish.json.JsonNumberImpl$JsonBigDecimalNumber to javax.json.JsonArray
- E: Error while reading json file!
- E: java.lang.ClassCastException: Cannot cast org.glassfish.json.JsonNumberImpl$JsonBigDecimalNumber to javax.json.JsonArray
}}}
"	defect	closed	normal	19.10	Core geojson		fixed	polygon export	
