#22178 closed defect (worksforme)
Request for clarification on the Custom ESRI Source Layer
Reported by: | Owned by: | taylor.smock | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin mapwithai | Version: | |
Keywords: | Cc: |
Description
Hi,
I am trying to see if I can make this dataset(https://rawjpbrx6qoszn6k.maps.arcgis.com/home/group.html?id=d55ced934c984ad5b9d7b5a83ef66559#overview) available through the ESRI sources option. I can see that there is an option to add ESRI type datasource from the MapWithAI preferences panel, but I don't seem to be able to get it to work. I suspect it's because it takes the group name from the id field of the source and that cannot be set from the preferences UI.
Any other way to go about it? (apart from submitting to the ESRI OSM team)
Attachments (0)
Change History (6)
comment:1 by , 3 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 3 years ago
- I did make the group public.. Maybe I am missing more settings.
- License review should be fine and I have started the process with osm@…. This was me just trying to check if the data is actually usable.
Tried adding the layer through the ESRI_FEATURE_SERVER route.. fails upon actual selection from the data panel during editing.
I created the group and tried the ESRI option because I couldn't get the ESRI_FEATURE_SERVER option to work.
Here is the error I am seeing( this is with the esri road sample layer ) -
Revision:18463 Build-Date:2022-05-30 10:26:29 Identification: JOSM/1.5 (18463 en) Mac OS X 12.0.1 OS Build number: macOS 12.0.1 (21A559) Memory Usage: 1130 MB / 2048 MB (259 MB allocated, but free) Java version: 17.0.3+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 1 1440×900 (scaling 2.00×2.00) Maximum Screen Size: 1440×900 Best cursor sizes: 16×16→16×16, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_IN Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=18463, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=/Applications/JOSM.app/Contents/MacOS/JOSM] Dataset consistency test: No problems found Plugins: + PicLayer (1.0.2) + apache-commons (35924) + apache-http (35924) + jna (35924) + mapwithai (1.9.15) + utilsplugin2 (35970) + webp-v0.0.4 (v0.0.4) Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1 Last errors/warnings: - 00017.777 E: Failed to locate image 'MapWithAI' - 00042.271 E: Exception raised in EDT: java.lang.reflect.InvocationTargetException. Cause: java.lang.IllegalMonitorStateException: current thread is not owner - 00069.590 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "javax.json.JsonArray.getValuesAs(java.lang.Class)" because "features" is null - 05216.918 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "javax.json.JsonArray.getValuesAs(java.lang.Class)" because "features" is null - 19433.297 E: Handled by bug report queue: java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because "java.util.Map$Entry.getValue().b" is null - 19580.133 E: Failed to locate image '[[Image(pond.png)]]' - 19580.166 E: Failed to locate image '[[Image(oil-palm.png)]]' - 20897.396 E: Handled by bug report queue: java.lang.RuntimeException: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request>. Cause: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request>. Cause: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request> - 21133.241 E: Handled by bug report queue: java.lang.RuntimeException: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request>. Cause: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request>. Cause: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request> === REPORTED CRASH DATA === BugReportExceptionHandler#handleException: No data collected. Warning issued by: BugReportExceptionHandler#handleException === STACK TRACE === Thread: AWT-EventQueue-0 (23) of main java.lang.RuntimeException: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request> at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.reportException(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.join(Unknown Source) at org.openstreetmap.josm.plugins.mapwithai.actions.AddMapWithAILayerAction.actionPerformed(AddMapWithAILayerAction.java:116) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source) at java.desktop/javax.swing.AbstractButton.doClick(Unknown Source) at java.desktop/com.apple.laf.ScreenMenuItem.actionPerformed(Unknown Source) at java.desktop/java.awt.MenuItem.processActionEvent(Unknown Source) at java.desktop/java.awt.MenuItem.processEvent(Unknown Source) at java.desktop/java.awt.MenuComponent.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.MenuComponent.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.desktop/java.awt.EventQueue$4.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.desktop/java.awt.EventQueue$5.run(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.desktop/java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.lang.RuntimeException: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request> at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(Unknown Source) at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source) at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source) Caused by: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Body=<Bad Request> at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:216) at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:138) at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:122) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:86) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:69) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:211) at org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader.parseOsm(BoundingBoxMapWithAIDownloader.java:86) at org.openstreetmap.josm.plugins.mapwithai.backend.MapWithAIDataUtils.lambda$download$6(MapWithAIDataUtils.java:170) ... 6 more
comment:3 by , 3 years ago
I forgot a step. Feature Servers have layers, and that is the actual URL needed.
So https://services6.arcgis.com/Do88DoK2xjTUCXd1/arcgis/rest/services/Esri_Roads_Sample_v1/FeatureServer -> Layers (pick one, you can either follow the link and copy that ( https://services6.arcgis.com/Do88DoK2xjTUCXd1/ArcGIS/rest/services/Esri_Roads_Sample_v1/FeatureServer/5 ) or append the layer number (in this case 5
) to the url with a leading slash so (/5
).
comment:4 by , 3 years ago
Different error this time -
Caused by: org.openstreetmap.josm.io.IllegalDataException: javax.json.stream.JsonParsingException: Unexpected char 60 at (line no=1, column no=1, offset=0) at org.openstreetmap.josm.io.GeoJSONReader.doParseDataSet(GeoJSONReader.java:476) at org.openstreetmap.josm.io.GeoJSONReader.parseDataSet(GeoJSONReader.java:536) at org.openstreetmap.josm.plugins.mapwithai.backend.BoundingBoxMapWithAIDownloader.parseDataSet(BoundingBoxMapWithAIDownloader.java:174) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:215) ... 8 more
Could be more misconfiguration on my part.. I will check and get back to you.
comment:5 by , 3 years ago
It should have printed the URL somewhere above that. Next time it happens, can you paste the link so I can check and see what the return value is?
A couple of things:
Anyway, using the OSM group as an example ( https://openstreetmap.maps.arcgis.com/home/group.html?id=bdf6c800b3ae453b9db239e03d7c1727#overview ), let us say that I want to add the
Esri roads sample (preview)
to the MapWithAI plugin. I would open that page ( https://openstreetmap.maps.arcgis.com/home/item.html?id=bd88b67f1b384a94a398ef731890d98f ), then underDetails
there is a link to theFeature Service
( https://services6.arcgis.com/Do88DoK2xjTUCXd1/arcgis/rest/services/Esri_Roads_Sample_v1/FeatureServer ). The Feature Server is what you put into JOSM (use typeESRI_FEATURE_SERVER
).If you want to add the group as a whole, I pretty much need to add it to https://gitlab.com/gokaart/JOSM_MapWithAI/-/blob/pages/public/json/sources.json . If you want to, you can make a pull request adding the dataset, but (again), you are going to need to go through some of the import steps (specifically license review). If we are adding a whole group, I would be even more strict (that entire group must go through license review and they must not ever publish anything with an incompatible license to that group).