kopia lustrzana https://github.com/JOSM/MapWithAI
Complete and total rename of all resources
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
43a5995c6d
commit
028f2878ea
14
README.md
14
README.md
|
@ -1,27 +1,27 @@
|
|||
# JOSM RapiD Plugin
|
||||
# JOSM MapWithAI Plugin (formerly RapiD Plugin)
|
||||
|
||||
[![pipeline status](https://gitlab.com/smocktaylor/rapid/badges/master/pipeline.svg)](https://gitlab.com/smocktaylor/rapid/commits/master)
|
||||
[![code coverage](https://gitlab.com/smocktaylor/rapid/badges/master/coverage.svg)](https://codecov.io/github/smocktaylor/rapid?branch=master)
|
||||
[![license](https://img.shields.io/badge/license-GPLv2-blue.svg?style=flat-square)](./LICENSE)
|
||||
|
||||
This plugin brings RapiD information into JOSM.
|
||||
This plugin brings MapWithAI information into JOSM.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
To use this plugin, [install JOSM](https://josm.openstreetmap.de/wiki/Download) and then [in the preferences menu install the **rapid** plugin](https://josm.openstreetmap.de/wiki/Help/Preferences/Plugins#AutomaticinstallationviaPreferencesmenu)
|
||||
To use this plugin, [install JOSM](https://josm.openstreetmap.de/wiki/Download) and then [in the preferences menu install the **MapWithAI** plugin](https://josm.openstreetmap.de/wiki/Help/Preferences/Plugins#AutomaticinstallationviaPreferencesmenu)
|
||||
|
||||
## Usage
|
||||
1. Open JOSM
|
||||
2. Install the plugin ("JOSM Preferences" -> "Plugins" -> "rapid")
|
||||
2. Install the plugin ("JOSM Preferences" -> "Plugins" -> "MapWithAI")
|
||||
3. Download data ("File" -> "Download Data") or just use the "Download data" button on the toolbar
|
||||
4. Download RapiD data ("Data" -> "RapiD")
|
||||
5. Switch to the "RapiD" layer (if you don't have one, file a bug report with the location)
|
||||
4. Download MapWithAI data ("Data" -> "MapWithAI")
|
||||
5. Switch to the "MapWithAI" layer (if you don't have one, file a bug report with the location)
|
||||
6. If you are in a location where Facebook has run its AI, *or* Microsoft has provided building footprints, you should see data. If you do not, check your paintstyles (some paintstyles make buildings *really* hard to see).
|
||||
|
||||
### Optional JOSM Setup
|
||||
1. Open JOSM
|
||||
2. Add the "RapiD" paintstyle by going to "Map Settings" -> "Map Paint Styles" -> the plus sign next to "Active styles" -> enter `https://gitlab.com/smocktaylor/rapid/raw/master/src/resources/styles/standard/rapid.mapcss` in the "URL / File" field.
|
||||
2. Add the "MapWithAI" paintstyle by going to "Map Settings" -> "Map Paint Styles" -> the plus sign next to "Active styles" -> enter `https://gitlab.com/smocktaylor/rapid/raw/master/src/resources/styles/standard/rapid.mapcss` in the "URL / File" field.
|
||||
|
||||
## Information
|
||||
* [RapiD](https://mapwith.ai/rapid)
|
||||
|
|
|
@ -101,7 +101,7 @@ tasks.processResources {
|
|||
from("$projectDir/src/resources")
|
||||
}
|
||||
|
||||
archivesBaseName = "rapid"
|
||||
archivesBaseName = "mapwithai"
|
||||
josm {
|
||||
i18n {
|
||||
pathTransformer = getPathTransformer("gitlab.com/smocktaylor/rapid/blob")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="rapid" default="dist" basedir=".">
|
||||
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="mapwithai" default="dist" basedir=".">
|
||||
<property name="plugin.src.dir" value="src/main/java"/>
|
||||
|
||||
<!-- edit the properties of this plugin in the file `gradle.properties` -->
|
||||
|
|
|
@ -10,3 +10,6 @@ plugin.class = org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin
|
|||
#plugin.icon = images/dialogs/rapid.svg
|
||||
plugin.link = https://gitlab.com/smocktaylor/rapid
|
||||
plugin.description = Allows the use of MapWithAI data in JOSM (same data as used in RapiD) (currently VERY rudimentary)
|
||||
|
||||
# This is due to changing the name of the plugin
|
||||
plugin.provides = rapid
|
||||
|
|
2
ivy.xml
2
ivy.xml
|
@ -1,3 +1,3 @@
|
|||
<ivy-module version="2.0">
|
||||
<info organisation="org.openstreetmap.josm.plugins" module="rapid"/>
|
||||
<info organisation="org.openstreetmap.josm.plugins" module="mapwithai"/>
|
||||
</ivy-module>
|
||||
|
|
|
@ -62,7 +62,7 @@ public final class DetectTaskingManagerUtils {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return A {@link Bound} made from a tasking manager layer, or one that is not
|
||||
* @return A {@link BBox} made from a tasking manager layer, or one that is not
|
||||
* valid.
|
||||
*/
|
||||
public static BBox getTaskingManagerBBox() {
|
||||
|
|
|
@ -308,8 +308,8 @@ public final class MapWithAIDataUtils {
|
|||
*/
|
||||
public static void addMapWithAIPaintStyles() {
|
||||
// TODO figure out how to use the one in the jar file
|
||||
final ExtendedSourceEntry mapWithAI = new ExtendedSourceEntry(SourceType.MAP_PAINT_STYLE, "rapid.mapcss",
|
||||
"https://gitlab.com/smocktaylor/rapid/raw/master/src/resources/styles/standard/rapid.mapcss");
|
||||
final ExtendedSourceEntry mapWithAI = new ExtendedSourceEntry(SourceType.MAP_PAINT_STYLE, "mapwithai.mapcss",
|
||||
"https://gitlab.com/smocktaylor/rapid/raw/master/src/resources/styles/standard/mapwithai.mapcss");
|
||||
final List<SourceEntry> paintStyles = MapPaintPrefHelper.INSTANCE.get();
|
||||
for (final SourceEntry paintStyle : paintStyles) {
|
||||
if (mapWithAI.url.equals(paintStyle.url)) {
|
||||
|
|
|
@ -20,10 +20,10 @@ public class AddNodeToWayCommand extends Command {
|
|||
/**
|
||||
* Add a node to a way in an undoable manner
|
||||
*
|
||||
* @param toAddNode The node to add
|
||||
* @param way The way to add the node to
|
||||
* @param firstNode The node that comes before the node to add
|
||||
* @param secondNode The node that comes after the node to add
|
||||
* @param toAddNode The node to add
|
||||
* @param way The way to add the node to
|
||||
* @param first The node that comes before the node to add
|
||||
* @param second The node that comes after the node to add
|
||||
*/
|
||||
public AddNodeToWayCommand(Node toAddNode, Way way, Node first, Node second) {
|
||||
super(way.getDataSet());
|
||||
|
|
|
@ -141,7 +141,8 @@ public class CreateConnectionsCommand extends Command {
|
|||
* Get the primitives from a dataset with specified ids
|
||||
*
|
||||
* @param dataSet The dataset holding the primitives (hopefully)
|
||||
* @param ids The ids formated like n<NUMBER>,r<NUMBER>,w<NUMBER>
|
||||
* @param ids The ids formated like
|
||||
* n<NUMBER>,r<NUMBER>,w<NUMBER>
|
||||
* @return The primitives that the ids point to, if in the dataset.
|
||||
*/
|
||||
private static OsmPrimitive[] getPrimitives(DataSet dataSet, String ids) {
|
||||
|
@ -213,7 +214,8 @@ public class CreateConnectionsCommand extends Command {
|
|||
* @param way The way to add the node to
|
||||
* @param first The first node in a waysegment (the node is between this and
|
||||
* the second node)
|
||||
* @param second The second node in a waysegemnt
|
||||
* @param second The second node in a waysegment
|
||||
* @return Command to add a node to a way, or null if it won't be done
|
||||
*/
|
||||
public static Command addNodesToWay(Node toAddNode, Way way, Node first, Node second) {
|
||||
Command tCommand = null;
|
||||
|
|
|
@ -28,7 +28,7 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
|||
* Add primitives from MapWithAI to the OSM data layer
|
||||
*
|
||||
* @param mapWithAILayer The MapWithAI layer
|
||||
* @param editableLayer The OSM layer
|
||||
* @param editLayer The OSM layer
|
||||
* @param selection The primitives to add from MapWithAI
|
||||
*/
|
||||
public MapWithAIAddCommand(MapWithAILayer mapWithAILayer, OsmDataLayer editLayer, Collection<OsmPrimitive> selection) {
|
||||
|
@ -96,6 +96,7 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
|||
* connecting to
|
||||
* @param collection The primitives with connection information (currently only
|
||||
* checks Nodes)
|
||||
* @return A Command to create connections from the collection
|
||||
*/
|
||||
public static Command createConnections(DataSet dataSet, Collection<OsmPrimitive> collection) {
|
||||
return new CreateConnectionsCommand(dataSet, collection);
|
||||
|
|
|
@ -50,6 +50,7 @@ public class MovePrimitiveDataSetCommand extends Command {
|
|||
* @param to The receiving dataset
|
||||
* @param from The sending dataset
|
||||
* @param selection The primitives to move
|
||||
* @return The command that does the actual move
|
||||
*/
|
||||
public static SequenceCommand moveCollection(DataSet from, DataSet to, Collection<OsmPrimitive> selection) {
|
||||
final List<Command> commands = new ArrayList<>();
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
meta
|
||||
{
|
||||
title: "RapiD";
|
||||
description: "Visualization of RapiD data";
|
||||
title: "MapWithAI";
|
||||
description: "Visualization of MapWithAI data";
|
||||
author: "Taylor Smock";
|
||||
version: "1_2019-09-21";
|
||||
min-josm-version: "15229";
|
||||
}
|
||||
|
||||
/*******************************************
|
||||
* Set .rapid for all known RapiD datasets *
|
||||
* Set .mapwithai for all known MapWithAI datasets *
|
||||
*******************************************/
|
||||
way[source=~/^(?i)(microsoft|digitalglobe)$/] {
|
||||
set .rapid;
|
||||
set .mapwithai;
|
||||
}
|
||||
|
||||
way.rapid {
|
||||
way.mapwithai {
|
||||
color: fuchsia;
|
||||
}
|
||||
way.rapid:closed2 {
|
||||
way.mapwithai:closed2 {
|
||||
fill-color: fuchsia;
|
||||
}
|
Ładowanie…
Reference in New Issue