Rewritten parser for GeoJSON files to handle styling

2019-08-27 Thread John Zaitseff
Hi, everyone, I tend to use the GeoJSON format (RFC7946) for storing things like the routes taken on my motorcycle rides. However, Marble currently has incomplete support for this format: files can be loaded, but any style formatting included by sites like https://geojson.io/ (and as specified by

[PATCH 01/10] Add the Marble writing example in GeoJSON format

2019-08-27 Thread John Zaitseff
The original KML file (in ../kml/Marble writing.kml) was converted to GeoJSON format using https://geojson.io/; then attributes were edited by hand in that website to be the same as the original KML file. The GeoJSON format is defined in RFC7946; the attributes follow the Simplestyle specification

[PATCH 06/10] Update the MIME type for GeoJSON files to be RFC7946-compliant

2019-08-27 Thread John Zaitseff
--- src/plugins/runner/json/marble_geojson.desktop | 2 +- src/plugins/runner/json/marble_part_geojson.desktop | 2 +- src/plugins/runner/json/marble_thumbnail_geojson.desktop | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/runner/json/marble_geojs

[PATCH 07/10] Minor code cleanup of GeoJSON plugin, adding the new author and date

2019-08-27 Thread John Zaitseff
--- src/plugins/runner/json/JsonPlugin.cpp | 19 ++- src/plugins/runner/json/JsonPlugin.h | 11 ++- src/plugins/runner/json/JsonRunner.cpp | 24 +--- src/plugins/runner/json/JsonRunner.h | 14 -- 4 files changed, 37 insertions(+), 31 dele

[PATCH 05/10] Implement most of the GeoJSON Simplestyle specification

2019-08-27 Thread John Zaitseff
Translate the properties "title", "name" (a commonly used non-standard property), "description", "marker-color", "stroke", "stroke-opacity", "stroke-width", "fill" and "fill-opacity" into appropriate Marble styles. Still to do: "marker-size" and "marker-symbol", presumably just for discrete points

[PATCH 02/10] Add valid GeoJSON examples from RFC7946

2019-08-27 Thread John Zaitseff
--- examples/json/rfc7946-a1.geojson | 4 ++ examples/json/rfc7946-a2.geojson | 7 +++ examples/json/rfc7946-a3.geojson | 12 examples/json/rfc7946-a3b.geojson | 19 +++ examples/json/rfc7946-a4.geojson | 7 +++ examples/json/rfc7946-a5.geojson | 13 +

[PATCH 09/10] Add the svgs/solid/dot-circle.svg icon from FontAwesome

2019-08-27 Thread John Zaitseff
FontAwesome icons are licensed under CC BY 4.0 and are available from https://github.com/FortAwesome/Font-Awesome.git The svgs/solid/dot-circle.svg from repository tag 5.10.2 (commit 090e6148d3f63a45b40e7cd8679bd4d64e58d75d) was used for this commit. --- data/CMakeLists.txt | 1 + dat

[PATCH 08/10] Add a test for the GeoJSON file parser

2019-08-27 Thread John Zaitseff
--- tests/MarbleRunnerManagerTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/MarbleRunnerManagerTest.cpp b/tests/MarbleRunnerManagerTest.cpp index 390b51b44..8477805f5 100644 --- a/tests/MarbleRunnerManagerTest.cpp +++ b/tests/MarbleRunnerManagerTest.cpp @@ -295

[PATCH 04/10] Completely rewrite the GeoJSON runner plugin for RFC7946 compliance

2019-08-27 Thread John Zaitseff
In particular, the plugin now handles GeoJSON files that do not contain a FeatureCollection top-level object. It also correctly handles GeometryCollection objects that can nest other GeoJSON geometry objects arbitrarily deep, by using a recursive parser. Furthermore, altitude values are now impor

[PATCH 03/10] Rename the RFC7946 examples to better reflect their contents

2019-08-27 Thread John Zaitseff
--- examples/json/{rfc7946-a1.geojson => rfc7946-a1-point.geojson}| 0 .../json/{rfc7946-a2.geojson => rfc7946-a2-linestring.geojson}| 0 .../{rfc7946-a3.geojson => rfc7946-a3-polygon-no-hole.geojson}| 0 .../{rfc7946-a3b.geojson => rfc7946-a3-polygon-with-hole.geojson} | 0 .../json/{

[PATCH 10/10] Initialise default styles just once; display an icon for points

2019-08-27 Thread John Zaitseff
Previously, default styles would be constructed for every placemark. Now create the default styles just once, then copy as required. In addition, now display an icon for placemarks with points, but not for lines or polygons. Currently, the icon cannot be styled with the Simplestyle properties "m

D19341: avoid lots of "Unknown feature GeoDataRelationType" warnings when loading an OSM file

2019-08-27 Thread Torsten Rahn
rahn accepted this revision. This revision is now accepted and ready to land. REPOSITORY R34 Marble REVISION DETAIL https://phabricator.kde.org/D19341 To: mkoller, rahn, #marble_general, nienhueser Cc: marble-devel, kde-edu, fbampaloukas, torhamzed, jalvarez, mnafees, shentey, chaz6, dkoloz

AW: Rewritten parser for GeoJSON files to handle styling

2019-08-27 Thread tac...@t-online.de
Hi John, looks very nice! Would you mind submitting these patches via Phabricator? See https://community.kde.org/Get_Involved/development#Submitting_your_first_patch and https://community.kde.org/Infrastructure/Phabricator Please set me on the list of reviewers. :-) Are you aware of any pla