Modify

Opened 8 years ago

Closed 7 years ago

Last modified 5 years ago

#13488 closed enhancement (fixed)

Exporting empty nodes as geojson?

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

Description

Shouldn't empty nodes (without any tags) also be exported as geojson?
For example, this single node:

<?xml version='1.0' encoding='UTF-8'?>
<osm version='0.6' upload='true' generator='JOSM'>
  <node id='-22' action='modify' visible='true' lat='-23.51627790358' lon='-46.62376870556' />
</osm>

When exported as geojson:

{
    "type":"FeatureCollection",
    "generator":"JOSM",
    "features":[
    ]
}

Shouldn't we have something like this?

{
    "type":"FeatureCollection",
    "generator":"JOSM",
    "features":[
        {
            "type":"Feature",
            "properties":{
            },
            "geometry":{
                "type":"Point",
                "coordinates":[
                    -46.62376870556,
                    -23.51627790358
                ]
            }
        }
    ]
}

JOSM:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-08-28 23:23:40 +0200 (Sun, 28 Aug 2016)
Build-Date:2016-08-29 01:36:51
Revision:10912
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10912 pt_BR) Linux Debian GNU/Linux testing (stretch)
Memory Usage: 297 MB / 10206 MB (109 MB allocated, but free)
Java version: 1.8.0_102-8u102-b14.1-2-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-8-jre:amd64-8u102-b14.1-2
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-8
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Plugins:
+ Create_grid_of_ways (32699)
+ ImportImagePlugin (32699)
+ OpeningHoursEditor (32699)
+ PicLayer (32796)
+ RoadSigns (32796)
+ SimplifyArea (32796)
+ apache-commons (32699)
+ buildings_tools (32796)
+ conflation (0.2.0)
+ contourmerge (1021)
+ download_along (32730)
+ editgpx (32699)
+ ejml (32680)
+ geojson (43)
+ geotools (32813)
+ importvec (32699)
+ indoorhelper (32680)
+ jts (32699)
+ log4j (32699)
+ measurement (32732)
+ merge-overlap (32699)
+ opendata (32811)
+ pbf (32865)
+ pdfimport (32796)
+ poly (32699)
+ reverter (32796)
+ scripting (30730)
+ todo (29154)
+ turnlanes (32796)
+ turnlanes-tagging (1471546398)
+ turnrestrictions (32796)
+ undelete (32699)
+ utilsplugin2 (32815)

Attachments (0)

Change History (8)

comment:1 by Don-vip, 8 years ago

Cc: simon04 added
Keywords: geojson added

comment:2 by simon04, 8 years ago

This is due to GeoJSONWriter#skipEmptyNodes which has been around since the first version of the GeoJSON exporter (r4886). I intentionally skipped those nodes since they do not convey any information (nodees of buildings, nodes of landuses, …).

Why would you need them?

comment:3 by naoliv, 8 years ago

I am using it to mark some places (where I need to know only the location) and export it to another softwares.

comment:4 by Don-vip, 8 years ago

maybe make it an advanced option?

comment:5 by Don-vip, 8 years ago

Summary: Not exporting empty node as geojsonExporting empty nodes as geojson?
Type: defectenhancement

comment:6 by Don-vip, 7 years ago

Milestone: 18.08

comment:7 by Don-vip, 7 years ago

Resolution: fixed
Status: newclosed

In 14115/josm:

fix #13488 - new advanced property geojson.export.skip-empty-nodes to control if empty nodes are exported in GeoJSON

comment:8 by Don-vip, 5 years ago

Component: CoreCore geojson

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.