kopia lustrzana https://github.com/JOSM/MapWithAI
rodzic
3a7e383700
commit
a14502d1d2
|
@ -146,7 +146,7 @@ public final class MapWithAIPlugin extends Plugin implements Destroyable {
|
||||||
}
|
}
|
||||||
|
|
||||||
MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).stream()
|
MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).stream()
|
||||||
.forEach(layer -> MainApplication.getLayerManager().removeLayer(layer));
|
.forEach(layer -> MainApplication.getLayerManager().removeLayer(layer));
|
||||||
|
|
||||||
if (!Config.getPref().getBoolean(PAINTSTYLE_PREEXISTS)) {
|
if (!Config.getPref().getBoolean(PAINTSTYLE_PREEXISTS)) {
|
||||||
MapWithAIDataUtils.removeMapWithAIPaintStyles();
|
MapWithAIDataUtils.removeMapWithAIPaintStyles();
|
||||||
|
|
|
@ -52,7 +52,7 @@ public class ReplacementPreferenceTable extends PreferencesTable {
|
||||||
|
|
||||||
return askAddSetting(gui, p)
|
return askAddSetting(gui, p)
|
||||||
? new PrefEntry(tkey.getText(), new StringSetting(tValue.getText()), new StringSetting(null), false)
|
? new PrefEntry(tkey.getText(), new StringSetting(tValue.getText()), new StringSetting(null), false)
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean askAddSetting(JComponent gui, JPanel p) {
|
private static boolean askAddSetting(JComponent gui, JPanel p) {
|
||||||
|
|
|
@ -30,8 +30,7 @@ public final class UpdateProd {
|
||||||
public static boolean doProd(int nextMinVersion) {
|
public static boolean doProd(int nextMinVersion) {
|
||||||
if (nextMinVersion > Version.getInstance().getVersion()) {
|
if (nextMinVersion > Version.getInstance().getVersion()) {
|
||||||
int doUpdate = ConditionalOptionPaneUtil.showOptionDialog(
|
int doUpdate = ConditionalOptionPaneUtil.showOptionDialog(
|
||||||
MapWithAIPlugin.NAME.concat(".ignore_next_version"),
|
MapWithAIPlugin.NAME.concat(".ignore_next_version"), MainApplication.getMainFrame(),
|
||||||
MainApplication.getMainFrame(),
|
|
||||||
tr("Please update JOSM -- {0} {1} is the last {0} version to support JOSM {2}",
|
tr("Please update JOSM -- {0} {1} is the last {0} version to support JOSM {2}",
|
||||||
MapWithAIPlugin.NAME, MapWithAIPlugin.getVersionInfo(),
|
MapWithAIPlugin.NAME, MapWithAIPlugin.getVersionInfo(),
|
||||||
Integer.toString(Version.getInstance().getVersion())),
|
Integer.toString(Version.getInstance().getVersion())),
|
||||||
|
|
|
@ -34,11 +34,9 @@ public class BoundingBoxMapWithAIDownloader extends BoundingBoxDownloader {
|
||||||
@Override
|
@Override
|
||||||
protected DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException {
|
protected DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException {
|
||||||
DataSet ds = OsmReaderCustom.parseDataSet(source, progressMonitor, true);
|
DataSet ds = OsmReaderCustom.parseDataSet(source, progressMonitor, true);
|
||||||
GetDataRunnable.addMapWithAISourceTag(ds,
|
GetDataRunnable.addMapWithAISourceTag(ds, MapWithAIPreferenceHelper.getMapWithAIUrl().stream()
|
||||||
MapWithAIPreferenceHelper.getMapWithAIUrl().stream()
|
.filter(map -> map.getOrDefault("url", "no-url").equals(url))
|
||||||
.filter(map -> map.getOrDefault("url", "no-url").equals(url))
|
.map(map -> map.getOrDefault("source", MapWithAIPlugin.NAME)).findFirst().orElse(MapWithAIPlugin.NAME));
|
||||||
.map(map -> map.getOrDefault("source", MapWithAIPlugin.NAME)).findFirst()
|
|
||||||
.orElse(MapWithAIPlugin.NAME));
|
|
||||||
GetDataRunnable.cleanup(ds, downloadArea);
|
GetDataRunnable.cleanup(ds, downloadArea);
|
||||||
return ds;
|
return ds;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,8 +75,8 @@ public final class MapWithAIAvailability {
|
||||||
cachedRapidReleases.setMaxAge(604_800);
|
cachedRapidReleases.setMaxAge(604_800);
|
||||||
parser.next();
|
parser.next();
|
||||||
final Stream<Entry<String, JsonValue>> entries = parser.getObjectStream();
|
final Stream<Entry<String, JsonValue>> entries = parser.getObjectStream();
|
||||||
final Optional<Entry<String, JsonValue>> objects = entries
|
final Optional<Entry<String, JsonValue>> objects = entries.filter(entry -> "objects".equals(entry.getKey()))
|
||||||
.filter(entry -> "objects".equals(entry.getKey())).findFirst();
|
.findFirst();
|
||||||
if (objects.isPresent()) {
|
if (objects.isPresent()) {
|
||||||
final JsonObject value = objects.get().getValue().asJsonObject();
|
final JsonObject value = objects.get().getValue().asJsonObject();
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
|
@ -120,8 +120,7 @@ public final class MapWithAIAvailability {
|
||||||
.orElse(Optional.ofNullable(countryLoop.get("ISO3166-2")).orElse(""));
|
.orElse(Optional.ofNullable(countryLoop.get("ISO3166-2")).orElse(""));
|
||||||
if ("".equals(key)) {
|
if ("".equals(key)) {
|
||||||
Logging.error("{0}: {1} does not have a \"ISO3166-1:alpha2\" or \"ISO3166-2\" key. {2}",
|
Logging.error("{0}: {1} does not have a \"ISO3166-1:alpha2\" or \"ISO3166-2\" key. {2}",
|
||||||
MapWithAIPlugin.NAME,
|
MapWithAIPlugin.NAME, countryLoop, countryLoop.getInterestingTags());
|
||||||
countryLoop, countryLoop.getInterestingTags());
|
|
||||||
} else {
|
} else {
|
||||||
Logging.trace("{0}: {1} has a country code of {2}", MapWithAIPlugin.NAME,
|
Logging.trace("{0}: {1} has a country code of {2}", MapWithAIPlugin.NAME,
|
||||||
countryLoop.get("name:en"), key);
|
countryLoop.get("name:en"), key);
|
||||||
|
|
|
@ -69,7 +69,7 @@ public final class MapWithAIDataUtils {
|
||||||
"https://gitlab.com/smocktaylor/rapid/raw/master/src/resources/styles/standard/rapid.mapcss",
|
"https://gitlab.com/smocktaylor/rapid/raw/master/src/resources/styles/standard/rapid.mapcss",
|
||||||
"resource://styles/standard/mapwithai.mapcss");
|
"resource://styles/standard/mapwithai.mapcss");
|
||||||
new ArrayList<>(MapPaintStyles.getStyles().getStyleSources()).parallelStream()
|
new ArrayList<>(MapPaintStyles.getStyles().getStyleSources()).parallelStream()
|
||||||
.filter(style -> oldUrls.contains(style.url)).forEach(MapPaintStyles::removeStyle);
|
.filter(style -> oldUrls.contains(style.url)).forEach(MapPaintStyles::removeStyle);
|
||||||
|
|
||||||
if (!checkIfMapWithAIPaintStyleExists()) {
|
if (!checkIfMapWithAIPaintStyleExists()) {
|
||||||
final MapCSSStyleSource style = new MapCSSStyleSource(paintStyleResourceUrl, MapWithAIPlugin.NAME,
|
final MapCSSStyleSource style = new MapCSSStyleSource(paintStyleResourceUrl, MapWithAIPlugin.NAME,
|
||||||
|
@ -91,8 +91,8 @@ public final class MapWithAIDataUtils {
|
||||||
*/
|
*/
|
||||||
public static void removeMapWithAIPaintStyles() {
|
public static void removeMapWithAIPaintStyles() {
|
||||||
new ArrayList<>(MapPaintStyles.getStyles().getStyleSources()).parallelStream()
|
new ArrayList<>(MapPaintStyles.getStyles().getStyleSources()).parallelStream()
|
||||||
.filter(source -> paintStyleResourceUrl.equals(source.url))
|
.filter(source -> paintStyleResourceUrl.equals(source.url))
|
||||||
.forEach(style -> SwingUtilities.invokeLater(() -> MapPaintStyles.removeStyle(style)));
|
.forEach(style -> SwingUtilities.invokeLater(() -> MapPaintStyles.removeStyle(style)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -172,15 +172,15 @@ public final class MapWithAIDataUtils {
|
||||||
} else {
|
} else {
|
||||||
final Notification noUrls = MapWithAIPreferenceHelper.getMapWithAIURLs().isEmpty()
|
final Notification noUrls = MapWithAIPreferenceHelper.getMapWithAIURLs().isEmpty()
|
||||||
? new Notification(tr("There are no defined URLs. To get the defaults, restart JOSM"))
|
? new Notification(tr("There are no defined URLs. To get the defaults, restart JOSM"))
|
||||||
: new Notification(tr("No URLS are enabled"));
|
: new Notification(tr("No URLS are enabled"));
|
||||||
noUrls.setDuration(Notification.TIME_DEFAULT);
|
noUrls.setDuration(Notification.TIME_DEFAULT);
|
||||||
noUrls.setIcon(JOptionPane.INFORMATION_MESSAGE);
|
noUrls.setIcon(JOptionPane.INFORMATION_MESSAGE);
|
||||||
noUrls.setHelpTopic(ht("Plugin/MapWithAI#Preferences"));
|
noUrls.setHelpTopic(ht("Plugin/MapWithAI#Preferences"));
|
||||||
if (SwingUtilities.isEventDispatchThread()) {
|
if (SwingUtilities.isEventDispatchThread()) {
|
||||||
noUrls.show();
|
noUrls.show();
|
||||||
} else {
|
} else {
|
||||||
SwingUtilities.invokeLater(noUrls::show);
|
SwingUtilities.invokeLater(noUrls::show);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dataSet;
|
return dataSet;
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ public final class MapWithAIPreferenceHelper {
|
||||||
return (layer != null) && (layer.getMapWithAIUrl() != null)
|
return (layer != null) && (layer.getMapWithAIUrl() != null)
|
||||||
? getMapWithAIURLs().parallelStream().filter(map -> layer.getMapWithAIUrl().equals(map.get(URL_STRING)))
|
? getMapWithAIURLs().parallelStream().filter(map -> layer.getMapWithAIUrl().equals(map.get(URL_STRING)))
|
||||||
.collect(Collectors.toList())
|
.collect(Collectors.toList())
|
||||||
: getMapWithAIURLs().stream()
|
: getMapWithAIURLs().stream()
|
||||||
.filter(map -> Boolean.valueOf(map.getOrDefault(ENABLED_STRING, Boolean.FALSE.toString())))
|
.filter(map -> Boolean.valueOf(map.getOrDefault(ENABLED_STRING, Boolean.FALSE.toString())))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,8 +87,9 @@ public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHan
|
||||||
@Override
|
@Override
|
||||||
protected void handleRequest() throws RequestHandlerErrorException, RequestHandlerBadRequestException {
|
protected void handleRequest() throws RequestHandlerErrorException, RequestHandlerBadRequestException {
|
||||||
if (crop != null && crop.isInWorld()) {
|
if (crop != null && crop.isInWorld()) {
|
||||||
MainApplication.getLayerManager().addLayer(new GpxLayer(
|
MainApplication.getLayerManager()
|
||||||
DetectTaskingManagerUtils.createTaskingManagerGpxData(crop), DetectTaskingManagerUtils.MAPWITHAI_CROP_AREA));
|
.addLayer(new GpxLayer(DetectTaskingManagerUtils.createTaskingManagerGpxData(crop),
|
||||||
|
DetectTaskingManagerUtils.MAPWITHAI_CROP_AREA));
|
||||||
}
|
}
|
||||||
|
|
||||||
final MapWithAILayer layer = MapWithAIDataUtils.getLayer(true);
|
final MapWithAILayer layer = MapWithAIDataUtils.getLayer(true);
|
||||||
|
@ -120,7 +121,7 @@ public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHan
|
||||||
final String br = "<br />";
|
final String br = "<br />";
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
sb.append(tr("Remote Control has been asked to load data from the API.")).append(" (").append(url).append(')')
|
sb.append(tr("Remote Control has been asked to load data from the API.")).append(" (").append(url).append(')')
|
||||||
.append(br).append(tr("{0} will ", MapWithAIPlugin.NAME));
|
.append(br).append(tr("{0} will ", MapWithAIPlugin.NAME));
|
||||||
if (Boolean.FALSE.equals(switchLayer)) {
|
if (Boolean.FALSE.equals(switchLayer)) {
|
||||||
sb.append(tr("not "));
|
sb.append(tr("not "));
|
||||||
}
|
}
|
||||||
|
@ -162,6 +163,6 @@ public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHan
|
||||||
"/mapwithai?url=https://www.facebook.com/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox={bbox}",
|
"/mapwithai?url=https://www.facebook.com/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox={bbox}",
|
||||||
"/mapwithai?bbox=-108.4625421,39.0621223,-108.4594728,39.0633059&max_obj=1",
|
"/mapwithai?bbox=-108.4625421,39.0621223,-108.4594728,39.0633059&max_obj=1",
|
||||||
"/mapwithai?bbox=-108.4625421,39.0621223,-108.4594728,39.0633059&switch_layer=false",
|
"/mapwithai?bbox=-108.4625421,39.0621223,-108.4594728,39.0633059&switch_layer=false",
|
||||||
"/mapwithai?crop_bbox=-108.4625421,39.0621223,-108.4594728,39.0633059" };
|
"/mapwithai?crop_bbox=-108.4625421,39.0621223,-108.4594728,39.0633059" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,11 +38,10 @@ public class MapWithAIUploadHook implements UploadHook, Destroyable {
|
||||||
if (MapWithAIPreferenceHelper.getMapWithAIUrl().parallelStream().anyMatch(
|
if (MapWithAIPreferenceHelper.getMapWithAIUrl().parallelStream().anyMatch(
|
||||||
map -> !MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API.equalsIgnoreCase(map.get("url")))) {
|
map -> !MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API.equalsIgnoreCase(map.get("url")))) {
|
||||||
sb.append(";url=")
|
sb.append(";url=")
|
||||||
.append(String.join(";url=",
|
.append(String.join(";url=", MapWithAIPreferenceHelper.getMapWithAIUrl().parallelStream()
|
||||||
MapWithAIPreferenceHelper.getMapWithAIUrl().parallelStream()
|
.filter(map -> map.containsKey("url")).map(map -> map.get("url"))
|
||||||
.filter(map -> map.containsKey("url")).map(map -> map.get("url"))
|
.filter(url -> !MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API.equalsIgnoreCase(url))
|
||||||
.filter(url -> !MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API.equalsIgnoreCase(url))
|
.collect(Collectors.toList())));
|
||||||
.collect(Collectors.toList())));
|
|
||||||
}
|
}
|
||||||
tags.put("mapwithai:options", sb.toString());
|
tags.put("mapwithai:options", sb.toString());
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,12 @@ import org.openstreetmap.josm.io.OsmReader;
|
||||||
import org.openstreetmap.josm.tools.Logging;
|
import org.openstreetmap.josm.tools.Logging;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parser for the Osm API (XML output). Read from an input stream and construct a dataset out of it.
|
* Parser for the Osm API (XML output). Read from an input stream and construct
|
||||||
|
* a dataset out of it.
|
||||||
*
|
*
|
||||||
* For each xml element, there is a dedicated method.
|
* For each xml element, there is a dedicated method. The XMLStreamReader cursor
|
||||||
* The XMLStreamReader cursor points to the start of the element, when the method is
|
* points to the start of the element, when the method is entered, and it must
|
||||||
* entered, and it must point to the end of the same element, when it is exited.
|
* point to the end of the same element, when it is exited.
|
||||||
*/
|
*/
|
||||||
public class OsmReaderCustom extends OsmReader {
|
public class OsmReaderCustom extends OsmReader {
|
||||||
protected OsmReaderCustom(boolean convertUnknownToTags) {
|
protected OsmReaderCustom(boolean convertUnknownToTags) {
|
||||||
|
@ -50,18 +51,20 @@ public class OsmReaderCustom extends OsmReader {
|
||||||
/**
|
/**
|
||||||
* Parse the given input source and return the dataset.
|
* Parse the given input source and return the dataset.
|
||||||
*
|
*
|
||||||
* @param source the source input stream. Must not be null.
|
* @param source the source input stream. Must not be null.
|
||||||
* @param progressMonitor the progress monitor. If null, {@link NullProgressMonitor#INSTANCE} is assumed
|
* @param progressMonitor the progress monitor. If null,
|
||||||
* @param convertUnknownToTags true if unknown xml attributes should be kept as tags
|
* {@link NullProgressMonitor#INSTANCE} is assumed
|
||||||
|
* @param convertUnknownToTags true if unknown xml attributes should be kept as
|
||||||
|
* tags
|
||||||
*
|
*
|
||||||
* @return the dataset with the parsed data
|
* @return the dataset with the parsed data
|
||||||
* @throws IllegalDataException if an error was found while parsing the data from the source
|
* @throws IllegalDataException if an error was found while parsing the data
|
||||||
|
* from the source
|
||||||
* @throws IllegalArgumentException if source is null
|
* @throws IllegalArgumentException if source is null
|
||||||
* @since xxx
|
* @since xxx
|
||||||
*/
|
*/
|
||||||
public static DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor,
|
public static DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor,
|
||||||
boolean convertUnknownToTags)
|
boolean convertUnknownToTags) throws IllegalDataException {
|
||||||
throws IllegalDataException {
|
|
||||||
return new OsmReaderCustom(convertUnknownToTags).doParseDataSet(source, progressMonitor);
|
return new OsmReaderCustom(convertUnknownToTags).doParseDataSet(source, progressMonitor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ import org.openstreetmap.josm.tools.Pair;
|
||||||
|
|
||||||
public abstract class AbstractConflationCommand extends Command {
|
public abstract class AbstractConflationCommand extends Command {
|
||||||
Collection<OsmPrimitive> possiblyAffectedPrimitives;
|
Collection<OsmPrimitive> possiblyAffectedPrimitives;
|
||||||
|
|
||||||
public AbstractConflationCommand(DataSet data) {
|
public AbstractConflationCommand(DataSet data) {
|
||||||
super(data);
|
super(data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class ConnectedCommand extends AbstractConflationCommand {
|
||||||
public Command getRealCommand() {
|
public Command getRealCommand() {
|
||||||
final List<Command> commands = new ArrayList<>();
|
final List<Command> commands = new ArrayList<>();
|
||||||
possiblyAffectedPrimitives.stream().filter(Node.class::isInstance).map(Node.class::cast)
|
possiblyAffectedPrimitives.stream().filter(Node.class::isInstance).map(Node.class::cast)
|
||||||
.forEach(node -> commands.addAll(connectedCommand(getAffectedDataSet(), node)));
|
.forEach(node -> commands.addAll(connectedCommand(getAffectedDataSet(), node)));
|
||||||
Command returnCommand = null;
|
Command returnCommand = null;
|
||||||
if (!commands.isEmpty()) {
|
if (!commands.isEmpty()) {
|
||||||
returnCommand = new SequenceCommand(getDescriptionText(), commands);
|
returnCommand = new SequenceCommand(getDescriptionText(), commands);
|
||||||
|
|
|
@ -47,12 +47,12 @@ public class MergeAddressBuildings extends AbstractConflationCommand {
|
||||||
List<Command> commands = new ArrayList<>();
|
List<Command> commands = new ArrayList<>();
|
||||||
if (MapWithAIPreferenceHelper.isMergeBuildingAddress()) {
|
if (MapWithAIPreferenceHelper.isMergeBuildingAddress()) {
|
||||||
possiblyAffectedPrimitives.stream().filter(Way.class::isInstance).map(Way.class::cast)
|
possiblyAffectedPrimitives.stream().filter(Way.class::isInstance).map(Way.class::cast)
|
||||||
.filter(way -> way.hasKey(BUILDING_KEY)).filter(Way::isClosed)
|
.filter(way -> way.hasKey(BUILDING_KEY)).filter(Way::isClosed)
|
||||||
.forEach(way -> commands.addAll(mergeAddressBuilding(getAffectedDataSet(), way)));
|
.forEach(way -> commands.addAll(mergeAddressBuilding(getAffectedDataSet(), way)));
|
||||||
|
|
||||||
possiblyAffectedPrimitives.stream().filter(Relation.class::isInstance).map(Relation.class::cast)
|
possiblyAffectedPrimitives.stream().filter(Relation.class::isInstance).map(Relation.class::cast)
|
||||||
.filter(rel -> rel.hasKey(BUILDING_KEY)).filter(Relation::isMultipolygon)
|
.filter(rel -> rel.hasKey(BUILDING_KEY)).filter(Relation::isMultipolygon)
|
||||||
.forEach(rel -> commands.addAll(mergeAddressBuilding(getAffectedDataSet(), rel)));
|
.forEach(rel -> commands.addAll(mergeAddressBuilding(getAffectedDataSet(), rel)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Command returnCommand = null;
|
Command returnCommand = null;
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class CreateConnectionsCommand extends Command {
|
||||||
}
|
}
|
||||||
final Collection<OsmPrimitive> tPrimitives = new TreeSet<>();
|
final Collection<OsmPrimitive> tPrimitives = new TreeSet<>();
|
||||||
abstractCommand.getInterestedTypes()
|
abstractCommand.getInterestedTypes()
|
||||||
.forEach(clazz -> tPrimitives.addAll(Utils.filteredCollection(realPrimitives, clazz)));
|
.forEach(clazz -> tPrimitives.addAll(Utils.filteredCollection(realPrimitives, clazz)));
|
||||||
|
|
||||||
final Command actualCommand = abstractCommand.getCommand(tPrimitives.stream()
|
final Command actualCommand = abstractCommand.getCommand(tPrimitives.stream()
|
||||||
.filter(prim -> prim.hasKey(abstractCommand.getKey())).collect(Collectors.toList()));
|
.filter(prim -> prim.hasKey(abstractCommand.getKey())).collect(Collectors.toList()));
|
||||||
|
|
|
@ -41,7 +41,8 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
||||||
* @param editLayer The OSM layer
|
* @param editLayer The OSM layer
|
||||||
* @param selection The primitives to add from MapWithAI
|
* @param selection The primitives to add from MapWithAI
|
||||||
*/
|
*/
|
||||||
public MapWithAIAddCommand(MapWithAILayer mapWithAILayer, OsmDataLayer editLayer, Collection<OsmPrimitive> selection) {
|
public MapWithAIAddCommand(MapWithAILayer mapWithAILayer, OsmDataLayer editLayer,
|
||||||
|
Collection<OsmPrimitive> selection) {
|
||||||
this(mapWithAILayer.getDataSet(), editLayer.getDataSet(), selection);
|
this(mapWithAILayer.getDataSet(), editLayer.getDataSet(), selection);
|
||||||
lock = mapWithAILayer.getLock();
|
lock = mapWithAILayer.getLock();
|
||||||
}
|
}
|
||||||
|
@ -76,8 +77,8 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (mapWithAI.equals(editable)) {
|
if (mapWithAI.equals(editable)) {
|
||||||
Logging.error("{0}: DataSet mapWithAI ({1}) should not be the same as DataSet editable ({2})", MapWithAIPlugin.NAME,
|
Logging.error("{0}: DataSet mapWithAI ({1}) should not be the same as DataSet editable ({2})",
|
||||||
mapWithAI, editable);
|
MapWithAIPlugin.NAME, mapWithAI, editable);
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
|
@ -91,7 +92,8 @@ public class MapWithAIAddCommand extends Command implements Runnable {
|
||||||
final Command movePrimitivesCommand = new MovePrimitiveDataSetCommand(editable, mapWithAI,
|
final Command movePrimitivesCommand = new MovePrimitiveDataSetCommand(editable, mapWithAI,
|
||||||
primitives);
|
primitives);
|
||||||
final Command createConnectionsCommand = createConnections(editable, allPrimitives);
|
final Command createConnectionsCommand = createConnections(editable, allPrimitives);
|
||||||
command = new SequenceCommand(getDescriptionText(), movePrimitivesCommand, createConnectionsCommand);
|
command = new SequenceCommand(getDescriptionText(), movePrimitivesCommand,
|
||||||
|
createConnectionsCommand);
|
||||||
}
|
}
|
||||||
command.executeCommand();
|
command.executeCommand();
|
||||||
} finally {
|
} finally {
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class MergeDuplicateWays extends Command {
|
||||||
public static void filterDataSet(DataSet dataSet, List<Command> commands, Bounds bound) {
|
public static void filterDataSet(DataSet dataSet, List<Command> commands, Bounds bound) {
|
||||||
final List<Way> ways = new ArrayList<>(
|
final List<Way> ways = new ArrayList<>(
|
||||||
(bound == null ? dataSet.getWays() : dataSet.searchWays(bound.toBBox())).parallelStream()
|
(bound == null ? dataSet.getWays() : dataSet.searchWays(bound.toBBox())).parallelStream()
|
||||||
.filter(prim -> !prim.isIncomplete() && !prim.isDeleted()).collect(Collectors.toList()));
|
.filter(prim -> !prim.isIncomplete() && !prim.isDeleted()).collect(Collectors.toList()));
|
||||||
for (int i = 0; i < ways.size(); i++) {
|
for (int i = 0; i < ways.size(); i++) {
|
||||||
final Way way1 = ways.get(i);
|
final Way way1 = ways.get(i);
|
||||||
final Collection<Way> nearbyWays = dataSet.searchWays(way1.getBBox()).parallelStream()
|
final Collection<Way> nearbyWays = dataSet.searchWays(way1.getBBox()).parallelStream()
|
||||||
|
|
|
@ -41,7 +41,6 @@ import org.openstreetmap.josm.tools.ImageProvider;
|
||||||
|
|
||||||
public class MapWithAIDownloadReader implements DownloadSource<MapWithAIDownloadReader.MapWithAIDownloadData> {
|
public class MapWithAIDownloadReader implements DownloadSource<MapWithAIDownloadReader.MapWithAIDownloadData> {
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AbstractDownloadSourcePanel<MapWithAIDownloadData> createPanel(DownloadDialog dialog) {
|
public AbstractDownloadSourcePanel<MapWithAIDownloadData> createPanel(DownloadDialog dialog) {
|
||||||
return new MapWithAIDownloadPanel(this);
|
return new MapWithAIDownloadPanel(this);
|
||||||
|
@ -65,8 +64,7 @@ public class MapWithAIDownloadReader implements DownloadSource<MapWithAIDownload
|
||||||
sb.append(urlInformation.get("url"));
|
sb.append(urlInformation.get("url"));
|
||||||
if (urlInformation.containsKey("parameters")) {
|
if (urlInformation.containsKey("parameters")) {
|
||||||
List<String> parameters = DataUrl.readJsonStringArraySimple(urlInformation.get("parameters"))
|
List<String> parameters = DataUrl.readJsonStringArraySimple(urlInformation.get("parameters"))
|
||||||
.parallelStream()
|
.parallelStream().filter(JsonObject.class::isInstance).map(JsonObject.class::cast)
|
||||||
.filter(JsonObject.class::isInstance).map(JsonObject.class::cast)
|
|
||||||
.filter(map -> map.getBoolean("enabled", false)).filter(map -> map.containsKey("parameter"))
|
.filter(map -> map.getBoolean("enabled", false)).filter(map -> map.containsKey("parameter"))
|
||||||
.map(map -> map.getString("parameter")).collect(Collectors.toList());
|
.map(map -> map.getString("parameter")).collect(Collectors.toList());
|
||||||
if (!parameters.isEmpty()) {
|
if (!parameters.isEmpty()) {
|
||||||
|
|
|
@ -88,10 +88,10 @@ public class MapWithAIPluginTest {
|
||||||
plugin.destroy();
|
plugin.destroy();
|
||||||
Assert.assertEquals(dataMenuSize, dataMenu.getMenuComponentCount());
|
Assert.assertEquals(dataMenuSize, dataMenu.getMenuComponentCount());
|
||||||
Awaitility.await().atMost(Durations.FIVE_SECONDS)
|
Awaitility.await().atMost(Durations.FIVE_SECONDS)
|
||||||
.until(() -> existed == MapWithAIDataUtils.checkIfMapWithAIPaintStyleExists());
|
.until(() -> existed == MapWithAIDataUtils.checkIfMapWithAIPaintStyleExists());
|
||||||
Assert.assertEquals(Config.getPref().getBoolean(MapWithAIPlugin.PAINTSTYLE_PREEXISTS) ? 1 : 0,
|
Assert.assertEquals(Config.getPref().getBoolean(MapWithAIPlugin.PAINTSTYLE_PREEXISTS) ? 1 : 0,
|
||||||
MapPaintStyles.getStyles().getStyleSources().parallelStream()
|
MapPaintStyles.getStyles().getStyleSources().parallelStream()
|
||||||
.filter(source -> source.url != null && source.name.contains("MapWithAI")).count());
|
.filter(source -> source.url != null && source.name.contains("MapWithAI")).count());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
|
|
|
@ -29,11 +29,9 @@ public class UpdateProdTest {
|
||||||
String booleanKey = "message.".concat(MapWithAIPlugin.NAME.concat(".ignore_next_version"));
|
String booleanKey = "message.".concat(MapWithAIPlugin.NAME.concat(".ignore_next_version"));
|
||||||
String intKey = "message.".concat(MapWithAIPlugin.NAME.concat(".ignore_next_version")).concat(".value"); // "message.MapWithAI.ignore_next_version.value";
|
String intKey = "message.".concat(MapWithAIPlugin.NAME.concat(".ignore_next_version")).concat(".value"); // "message.MapWithAI.ignore_next_version.value";
|
||||||
Config.getPref().putBoolean(booleanKey, false);
|
Config.getPref().putBoolean(booleanKey, false);
|
||||||
Config.getPref().putInt(intKey,
|
Config.getPref().putInt(intKey, JOptionPane.YES_OPTION);
|
||||||
JOptionPane.YES_OPTION);
|
|
||||||
assertTrue(UpdateProd.doProd(Integer.MAX_VALUE));
|
assertTrue(UpdateProd.doProd(Integer.MAX_VALUE));
|
||||||
Config.getPref().putInt(intKey,
|
Config.getPref().putInt(intKey, JOptionPane.NO_OPTION);
|
||||||
JOptionPane.NO_OPTION);
|
|
||||||
assertTrue(UpdateProd.doProd(Integer.MAX_VALUE));
|
assertTrue(UpdateProd.doProd(Integer.MAX_VALUE));
|
||||||
assertFalse(UpdateProd.doProd(0));
|
assertFalse(UpdateProd.doProd(0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,9 @@ public class DetectTaskingManagerUtilsTest {
|
||||||
Assert.assertFalse(DetectTaskingManagerUtils.hasTaskingManagerLayer());
|
Assert.assertFalse(DetectTaskingManagerUtils.hasTaskingManagerLayer());
|
||||||
|
|
||||||
final BBox bbox = new BBox(0, 0, 1, 1);
|
final BBox bbox = new BBox(0, 0, 1, 1);
|
||||||
MainApplication.getLayerManager().addLayer(new GpxLayer(DetectTaskingManagerUtils.createTaskingManagerGpxData(bbox),
|
MainApplication.getLayerManager()
|
||||||
DetectTaskingManagerUtils.MAPWITHAI_CROP_AREA));
|
.addLayer(new GpxLayer(DetectTaskingManagerUtils.createTaskingManagerGpxData(bbox),
|
||||||
|
DetectTaskingManagerUtils.MAPWITHAI_CROP_AREA));
|
||||||
|
|
||||||
Assert.assertTrue(DetectTaskingManagerUtils.hasTaskingManagerLayer());
|
Assert.assertTrue(DetectTaskingManagerUtils.hasTaskingManagerLayer());
|
||||||
Assert.assertTrue(DetectTaskingManagerUtils.getTaskingManagerBBox().bounds(bbox));
|
Assert.assertTrue(DetectTaskingManagerUtils.getTaskingManagerBBox().bounds(bbox));
|
||||||
|
|
|
@ -115,8 +115,8 @@ public class GetDataRunnableTest {
|
||||||
@Test
|
@Test
|
||||||
public void testRegressionTicket46() {
|
public void testRegressionTicket46() {
|
||||||
DataSet ds = new DataSet();
|
DataSet ds = new DataSet();
|
||||||
new GetDataRunnable(Arrays.asList(new BBox(-5.7400005, 34.4524384, -5.6686014, 34.5513153)), ds,
|
new GetDataRunnable(Arrays.asList(new BBox(-5.7400005, 34.4524384, -5.6686014, 34.5513153)), ds, null).fork()
|
||||||
null).fork().join();
|
.join();
|
||||||
assertNotNull(ds);
|
assertNotNull(ds);
|
||||||
assertFalse(ds.isEmpty());
|
assertFalse(ds.isEmpty());
|
||||||
assertFalse(ds.allNonDeletedPrimitives().isEmpty());
|
assertFalse(ds.allNonDeletedPrimitives().isEmpty());
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class MapWithAIActionTest {
|
||||||
MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(), "temporary", null));
|
MainApplication.getLayerManager().addLayer(new OsmDataLayer(new DataSet(), "temporary", null));
|
||||||
action.actionPerformed(null);
|
action.actionPerformed(null);
|
||||||
Awaitility.await().atMost(Durations.TEN_SECONDS)
|
Awaitility.await().atMost(Durations.TEN_SECONDS)
|
||||||
.until(() -> 1 == MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
.until(() -> 1 == MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
||||||
assertEquals(1, MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
assertEquals(1, MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).size());
|
||||||
|
|
||||||
assertSame(MapWithAIDataUtils.getLayer(false), MainApplication.getLayerManager().getActiveLayer());
|
assertSame(MapWithAIDataUtils.getLayer(false), MainApplication.getLayerManager().getActiveLayer());
|
||||||
|
|
|
@ -31,8 +31,8 @@ public class MapWithAIAvailabilityTest {
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
wireMock.start();
|
wireMock.start();
|
||||||
MapWithAIAvailability.setReleaseUrl(wireMock.baseUrl()
|
MapWithAIAvailability.setReleaseUrl(
|
||||||
+ "/facebookmicrosites/Open-Mapping-At-Facebook/master/data/rapid_releases.geojson");
|
wireMock.baseUrl() + "/facebookmicrosites/Open-Mapping-At-Facebook/master/data/rapid_releases.geojson");
|
||||||
Territories.initialize();
|
Territories.initialize();
|
||||||
instance = MapWithAIAvailability.getInstance();
|
instance = MapWithAIAvailability.getInstance();
|
||||||
LatLon temp = new LatLon(40, -100);
|
LatLon temp = new LatLon(40, -100);
|
||||||
|
|
|
@ -35,8 +35,7 @@ public class MapWithAIMoveActionTest {
|
||||||
moveAction = new MapWithAIMoveAction();
|
moveAction = new MapWithAIMoveAction();
|
||||||
final DataSet osmData = new DataSet();
|
final DataSet osmData = new DataSet();
|
||||||
mapWithAIData = new DataSet();
|
mapWithAIData = new DataSet();
|
||||||
way1 = TestUtils.newWay("highway=residential", new Node(new LatLon(0, 0)),
|
way1 = TestUtils.newWay("highway=residential", new Node(new LatLon(0, 0)), new Node(new LatLon(0.1, 0.1)));
|
||||||
new Node(new LatLon(0.1, 0.1)));
|
|
||||||
way2 = TestUtils.newWay("highway=residential", new Node(new LatLon(-0.1, -0.1)),
|
way2 = TestUtils.newWay("highway=residential", new Node(new LatLon(-0.1, -0.1)),
|
||||||
new Node(new LatLon(0.1, 0.1)));
|
new Node(new LatLon(0.1, 0.1)));
|
||||||
way1.getNodes().forEach(node -> mapWithAIData.addPrimitive(node));
|
way1.getNodes().forEach(node -> mapWithAIData.addPrimitive(node));
|
||||||
|
@ -45,8 +44,7 @@ public class MapWithAIMoveActionTest {
|
||||||
mapWithAIData.addPrimitive(way1);
|
mapWithAIData.addPrimitive(way1);
|
||||||
|
|
||||||
osmLayer = new OsmDataLayer(osmData, "osm", null);
|
osmLayer = new OsmDataLayer(osmData, "osm", null);
|
||||||
final MapWithAILayer mapWithAILayer = new MapWithAILayer(mapWithAIData, "MapWithAI",
|
final MapWithAILayer mapWithAILayer = new MapWithAILayer(mapWithAIData, "MapWithAI", null);
|
||||||
null);
|
|
||||||
MainApplication.getLayerManager().addLayer(osmLayer);
|
MainApplication.getLayerManager().addLayer(osmLayer);
|
||||||
MainApplication.getLayerManager().addLayer(mapWithAILayer);
|
MainApplication.getLayerManager().addLayer(mapWithAILayer);
|
||||||
MainApplication.getLayerManager().setActiveLayer(mapWithAILayer);
|
MainApplication.getLayerManager().setActiveLayer(mapWithAILayer);
|
||||||
|
|
|
@ -52,13 +52,11 @@ public class MapWithAIRemoteControlTest {
|
||||||
@Before
|
@Before
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
wireMock.start();
|
wireMock.start();
|
||||||
MapWithAIPreferenceHelper.setMapWithAIURLs(MapWithAIPreferenceHelper.getMapWithAIURLs().stream()
|
MapWithAIPreferenceHelper.setMapWithAIURLs(MapWithAIPreferenceHelper.getMapWithAIURLs().stream().map(map -> {
|
||||||
.map(map -> {
|
map.put("url", map.getOrDefault("url", MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API)
|
||||||
map.put("url",
|
.replace("https://www.facebook.com", wireMock.baseUrl()));
|
||||||
map.getOrDefault("url", MapWithAIPreferenceHelper.DEFAULT_MAPWITHAI_API)
|
return map;
|
||||||
.replace("https://www.facebook.com", wireMock.baseUrl()));
|
}).collect(Collectors.toList()));
|
||||||
return map;
|
|
||||||
}).collect(Collectors.toList()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
@ -76,6 +74,7 @@ public class MapWithAIRemoteControlTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unit test for bad request - invalid URL.
|
* Unit test for bad request - invalid URL.
|
||||||
|
*
|
||||||
* @throws Exception if any error occurs
|
* @throws Exception if any error occurs
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
|
@ -134,9 +133,8 @@ public class MapWithAIRemoteControlTest {
|
||||||
|
|
||||||
thrown.expect(RequestHandlerBadRequestException.class);
|
thrown.expect(RequestHandlerBadRequestException.class);
|
||||||
thrown.expectMessage("NumberFormatException (For input string: \"BAD_VALUE\")");
|
thrown.expectMessage("NumberFormatException (For input string: \"BAD_VALUE\")");
|
||||||
newHandler(
|
newHandler("http://127.0.0.1:8111/mapwithai?bbox=" + getTestBBox().toStringCSV(",") + "&max_obj=BAD_VALUE")
|
||||||
"http://127.0.0.1:8111/mapwithai?bbox=" + getTestBBox().toStringCSV(",") + "&max_obj=BAD_VALUE")
|
.handle();
|
||||||
.handle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -146,8 +144,9 @@ public class MapWithAIRemoteControlTest {
|
||||||
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
assertFalse(MainApplication.getLayerManager().getLayersOfType(MapWithAILayer.class).isEmpty());
|
||||||
|
|
||||||
await().atMost(Durations.TEN_SECONDS)
|
await().atMost(Durations.TEN_SECONDS)
|
||||||
.until(() -> !MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().isEmpty());
|
.until(() -> !MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().isEmpty());
|
||||||
final BBox added = MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().iterator().next().toBBox();
|
final BBox added = MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().iterator().next()
|
||||||
|
.toBBox();
|
||||||
assertTrue(temp.bounds(added));
|
assertTrue(temp.bounds(added));
|
||||||
|
|
||||||
MainApplication.getLayerManager().removeLayer(MapWithAIDataUtils.getLayer(false));
|
MainApplication.getLayerManager().removeLayer(MapWithAIDataUtils.getLayer(false));
|
||||||
|
|
|
@ -104,8 +104,8 @@ public class MapWithAIUploadHookTest {
|
||||||
|
|
||||||
BBox tBBox = new BBox(1, 0, 0, 1);
|
BBox tBBox = new BBox(1, 0, 0, 1);
|
||||||
MainApplication.getLayerManager()
|
MainApplication.getLayerManager()
|
||||||
.addLayer(new GpxLayer(DetectTaskingManagerUtils.createTaskingManagerGpxData(tBBox),
|
.addLayer(new GpxLayer(DetectTaskingManagerUtils.createTaskingManagerGpxData(tBBox),
|
||||||
DetectTaskingManagerUtils.MAPWITHAI_CROP_AREA));
|
DetectTaskingManagerUtils.MAPWITHAI_CROP_AREA));
|
||||||
|
|
||||||
tags.clear();
|
tags.clear();
|
||||||
hook.modifyChangesetTags(tags);
|
hook.modifyChangesetTags(tags);
|
||||||
|
|
|
@ -102,8 +102,8 @@ public class MapWithAIAddComandTest {
|
||||||
new Node(new LatLon(0.05, 0.2)));
|
new Node(new LatLon(0.05, 0.2)));
|
||||||
way2.firstNode().put("conn",
|
way2.firstNode().put("conn",
|
||||||
"w".concat(Long.toString(way1.getUniqueId())).concat(",n")
|
"w".concat(Long.toString(way1.getUniqueId())).concat(",n")
|
||||||
.concat(Long.toString(way1.firstNode().getUniqueId())).concat(",n")
|
.concat(Long.toString(way1.firstNode().getUniqueId())).concat(",n")
|
||||||
.concat(Long.toString(way1.lastNode().getUniqueId())));
|
.concat(Long.toString(way1.lastNode().getUniqueId())));
|
||||||
way1.getNodes().forEach(node -> ds1.addPrimitive(node));
|
way1.getNodes().forEach(node -> ds1.addPrimitive(node));
|
||||||
way2.getNodes().forEach(node -> ds1.addPrimitive(node));
|
way2.getNodes().forEach(node -> ds1.addPrimitive(node));
|
||||||
ds1.addPrimitive(way2);
|
ds1.addPrimitive(way2);
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class MergeAddressBuildingsTest {
|
||||||
Node address = TestUtils.newNode("addr:street=None addr:housenumber=2");
|
Node address = TestUtils.newNode("addr:street=None addr:housenumber=2");
|
||||||
building.getNodes().forEach(ds::addPrimitive);
|
building.getNodes().forEach(ds::addPrimitive);
|
||||||
MainApplication.getLayerManager()
|
MainApplication.getLayerManager()
|
||||||
.addLayer(new OsmDataLayer(ds, "required for ReplaceGeometry in utilsplugin2", null));
|
.addLayer(new OsmDataLayer(ds, "required for ReplaceGeometry in utilsplugin2", null));
|
||||||
ds.addPrimitive(building);
|
ds.addPrimitive(building);
|
||||||
ds.addPrimitive(address);
|
ds.addPrimitive(address);
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class MapWithAIDownloadReaderTest {
|
||||||
Awaitility.await().atMost(Durations.TEN_SECONDS).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
Awaitility.await().atMost(Durations.TEN_SECONDS).until(() -> MapWithAIDataUtils.getLayer(false) != null);
|
||||||
assertNotNull(MapWithAIDataUtils.getLayer(false));
|
assertNotNull(MapWithAIDataUtils.getLayer(false));
|
||||||
Awaitility.await().atMost(Durations.TEN_SECONDS)
|
Awaitility.await().atMost(Durations.TEN_SECONDS)
|
||||||
.until(() -> !MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().isEmpty());
|
.until(() -> !MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().isEmpty());
|
||||||
assertFalse(MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().isEmpty());
|
assertFalse(MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().isEmpty());
|
||||||
assertTrue(settings.getDownloadBounds().get().toBBox().bboxIsFunctionallyEqual(
|
assertTrue(settings.getDownloadBounds().get().toBBox().bboxIsFunctionallyEqual(
|
||||||
MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().get(0).toBBox(), 0.0001));
|
MapWithAIDataUtils.getLayer(false).getDataSet().getDataSourceBounds().get(0).toBBox(), 0.0001));
|
||||||
|
|
Ładowanie…
Reference in New Issue