Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#22022 closed defect (fixed)

[Patch] Content of opened geojson file is not displayed

Reported by: wolfgang8 Owned by: team
Priority: normal Milestone: 22.05
Component: Core geojson Version: tested
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Menue File/Open "AT_crossinghighways.geojson"

What is the expected result?

Content of the goejson file "AT_crossinghighways.geojson" will be displayed in a new layer.

What happens instead?

A new layer is created, but it is empty.

Please provide any additional information below. Attach a screenshot if possible.

The file was downloaded from GitHub. See https://github.com/mapbox/mapping/issues/408 under section "Linter Output for Austria".

http://geojson.io/#map=2/20.0/-0.2 displays the file content without any problems. (Menue Open/File)

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-04-04 22:26:00 +0200 (Mon, 04 Apr 2022)
Build-Date:2022-04-05 01:30:55
Revision:18427
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18427 de) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19043)
Memory Usage: 914 MB / 1820 MB (640 MB allocated, but free)
Java version: 1.8.0_301-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: de_AT
Numbers with default locale: 1234567890 -> 1234567890

Plugins:
+ AddrInterpolation (35924)
+ FastDraw (35893)
+ FixAddresses (35893)
+ OpeningHoursEditor (35924)
+ PicLayer (1.0.2)
+ RoadSigns (35935)
+ alignways (35951)
+ apache-commons (35924)
+ apache-http (35924)
+ buildings_tools (35951)
+ changeset-viewer (v0.0.4)
+ ejml (35924)
+ geotools (35956)
+ graphview (35893)
+ jaxb (35952)
+ jna (35924)
+ jts (35924)
+ opendata (35910)
+ reltoolbox (35893)
+ reverter (35893)
+ tageditor (35893)
+ turnlanes-tagging (v0.0.5)
+ undelete (35893)
+ utilsplugin2 (35951)
+ waydownloader (35893)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewParkingFeatures&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Crafts&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Historical_Objects&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Heritage&zip=1
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/A.zip
+ https://josm.openstreetmap.de/josmfile?page=Presets/BuildingPreset&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/MobilePhoneBaseStations&zip=1
+ https://raw.githubusercontent.com/OpenNauticalChart/josm/master/Presets_Hafen.xml
+ <josm.pref>\xmas.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Golf_Course&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/Healthcare&zip=1

Map paint styles:
- https://github.com/simon04/coloured-addresses.mapcss/raw/master/dist/coloured-addresses.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&zip=1
- https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Postcode&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- <josm.pref>\Kartenstile\addr_unit.mapcss
+ <josm.pref>\Kartenstile\ChangeFontSize.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SidewalksAndFootways&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1

Last errors/warnings:
- 00012.598 E: Fehler beim Laden des Bildes 'xmastree.png'
- 00012.598 W:  XMAS: Could not get presets icon xmastree.png
- 00012.599 E: Fehler beim Laden des Bildes 'xmastree.png'
- 00012.600 W:  Weihnachtsbaum: Could not get presets icon xmastree.png
- 00012.601 E: Fehler beim Laden des Bildes 'xmas_market.png'
- 00012.601 W:  Weihnachtsmarkt: Could not get presets icon xmas_market.png
- 00012.602 E: Fehler beim Laden des Bildes 'xmas_event.png'
- 00012.602 W:  WeihnachtsEvent: Could not get presets icon xmas_event.png
- 00012.603 E: Fehler beim Laden des Bildes 'xmas_pyramid.png'
- 00012.603 W:  Weihnachtspyramide: Could not get presets icon xmas_pyramid.png

Attachments (1)

22022.patch (16.6 KB ) - added by taylor.smock 3 years ago.
Allow for recursive geojson parsing

Download all attachments as: .zip

Change History (8)

comment:1 by taylor.smock, 3 years ago

At this time, JOSM expects inner FeatureCollections to be a valid OSM Relation. This means that the properties for each inner FeatureCollection must have a type key. However, JOSM does not currently parse the features inside inner FeatureCollections -- it just parses the root and makes a new (empty) relation.

Example:

{
  "features": [
    {
      "features": [
        {
          "geometry": {
            "type": "LineString",
            "coordinates": [
              [
                13.03799,
                46.901553
              ],
              [
                13.039652,
                46.906285
              ]
            ]
          },
          "properties": {
            "id": "322517711"
          },
          "type": "Feature"
        },
        {
          "geometry": {
            "type": "LineString",
            "coordinates": [
              [
                13.034918,
                46.896869
              ],
              [
                13.057656,
                46.906829
              ]
            ]
          },
          "properties": {
            "id": "322519157"
          },
          "type": "Feature"
        },
        {
          "geometry": {
            "type": "Point",
            "coordinates": [
              13.03799,
              46.901553
            ]
          },
          "properties": {
            "_osmlint": "crossinghighways"
          },
          "type": "Feature"
        }
      ],
      "properties": {"type": "crossinghighways"},
      "type": "FeatureCollection"
    }
  ],
  "properties": {},
  "type": "FeatureCollection"
}

by taylor.smock, 3 years ago

Attachment: 22022.patch added

Allow for recursive geojson parsing

comment:2 by skyper, 3 years ago

Summary: Content of opened goejson file is not displayed[Patch] Content of opened goejson file is not displayed

comment:3 by taylor.smock, 3 years ago

Resolution: fixed
Status: newclosed

In 18441/josm:

Fix #22022: Allow for recursive geojson parsing

This allows us to parse more geojsons without losing data.

This patch also removes the requirement that a new relation have
type=<SOME TYPE>. This should allow some usecases to work now
(for example, people can now examine the validation output from
some tools). We still don't add relations that have no tags and
have no members.

comment:4 by taylor.smock, 3 years ago

Milestone: 22.05

comment:5 by skyper, 3 years ago

Summary: [Patch] Content of opened goejson file is not displayed[Patch] Content of opened geojson file is not displayed

comment:6 by wolfgang8, 3 years ago

Thanks a lot - with JOSM 18463 it works now!

comment:7 by taylor.smock, 3 years ago

Thank you for coming back and confirming that it works for you now.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
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.