|
POST
|
I can see you've posted a couple of similar editing and delete questions so I'll use this thread to hopefully help with your issue. The Java API isn't aiming to be a 1:1 mapping of the REST api, although as you've seen we use it in the background. The Java API has been designed to make editing workflows on desktop based applications easy. All the things you list above are possible, but rather than me trying to make a comparison with the REST and and Java it may be more useful if you were to explain what you are trying to achieve. Remember that the Java API is intended for writing desktop (JavaFX) applications and isn't intended for writing server side components like microservices. There are lots of sample apps in github which may help you including this one which shows you how to select and delete features. If the samples don't help then if you explain your application a little more I can point you in the right direction.
... View more
07-12-2022
07:54 AM
|
0
|
1
|
1470
|
|
POST
|
I can't say I fully understand what you are trying to do, but I'll try to begin to help. You mention that there is a "database" in your application which you want to search. Is this a database of geospatial data? Can you tell me about the format of this data and where it lives? For example, is it an Esri geodatabase or hosted data in a feature service or OGC dataset. It would also help if you could describe what you are trying to achieve in real life. What do the points represent ? I'm pretty confident I can help, but I need to fully understand what you are trying to do. Thanks Mark
... View more
06-28-2022
09:12 AM
|
0
|
1
|
3097
|
|
POST
|
What you've described sounds possible to me. My initial thoughts are that you'd draw the grid points on the fly when you pan or zoom the map. Drawing 3million by 3 million points would be wasteful on resources. The points would be drawn using a graphics overlap on the mapView which in turn would contain your graphics for the points. The other option you have is to create a dataset (a feature service for example) of points which has the grid points already created. If you tell me a little more about your application ideas I can make some suggestions. I need to know things like: - What are you aligning these point to? - Is the display a static map, or are you planning on it moving around a lot - Is this a standalone application or does it integrate with ArcGIS Online or OGC datasets?
... View more
06-27-2022
12:56 AM
|
0
|
1
|
3111
|
|
POST
|
I was discussing this with colleagues and noticed that you'd asked a similar question on the Android channel. Did the answer here clear this up for for you?
... View more
06-13-2022
01:16 AM
|
0
|
1
|
845
|
|
POST
|
Hi Erza, I wanted to let you know that I'm taking a look at what might be happening here. I'll report back when I've got some more information. Thanks Mark
... View more
05-26-2022
06:07 AM
|
1
|
2
|
1068
|
|
POST
|
I need to understand a little more about the workflow you are using here. Why are you loading the stylx file multiple times? I'd only expect you to load this once when you start the application up. Do you have any code you can share which demonstrates the workflow? The other thing to note is 100.4 is a very old release and the product has moved along a lot over the years. The latest version is 100.14. Are you able to move to this release? You'll have to get over the Java 8 barrier, but you'll benefit massively once you've done this.
... View more
05-13-2022
03:15 AM
|
0
|
0
|
490
|
|
POST
|
I don't have any specific code to do what you are looking for, but I'd approach it something like this: When you identify or get the geometry of say an arrow you you'll get back a MultiPoint which will contain the control points for your arrow. You should be able to work out a delta x and y from your dragging operation. You can create a new MultiPoint by looping through the points in the old geometry, apply the delta to each point and then set the new geometry to your graphic. Does this help?
... View more
04-11-2022
04:13 AM
|
0
|
0
|
776
|
|
POST
|
The easiest approach for accessing the data is to publish a Feature Service in ArcGIS Server and you can access the data using the ArcGISFeatureTable class. From this you can query to access the geometry and attribute data for the features. If you can get a feature service published, I'll be happy to write some example code if you need help. Using Local Server to access the data is an option, but I'd strongly discourage you from using this old technology if possible. You mention that your app doesn't use a GUI. Can you tell me a little more about what you are using runtime for?
... View more
02-09-2022
11:42 AM
|
0
|
0
|
975
|
|
POST
|
@HammadMuddassir this question looks similar to what you were asking a few weeks ago here. What you are trying to achieve is possible using the Local Server product, but the method of accessing data is very outdated. Adding Local Server to your project will also add to the licensing costs of your deployment. A much better approach to access your data is to get a Feature Service published for the data in your Oracle DB. The service will come from ArcGIS Server and will make your application much easier to write.
... View more
02-07-2022
05:24 AM
|
0
|
1
|
992
|
|
POST
|
That's a fair point about the documentation, I've fed that information back to our geometry team.
... View more
01-17-2022
02:13 AM
|
0
|
0
|
1969
|
|
POST
|
Hi @Tone The elliptic arc works on radians for the angles and the radius will be the unit of measure used in the spatial reference of the centre point. So if your centre point is in WGS84 then the radius will be in decimal degrees. Having a radius measured in decimal degrees is likely to be confusing so my strategy here is as follows: - Create the point in WGS 84 - Project the point into a projected coordinate system which uses metres as its unit of measure. Web mercator is a commonly used one, but you might want to use a local coordinate system such as a UTM zone for example. - Create the elliptic arc using the projected point, and the radius you pass in will be in metres. I've written some basic code to show this in action where I've drawn a 45degree arc (converted to radians) off the East coast of Scotland. // set up spatial references
SpatialReference wgs84 = SpatialReferences.getWgs84();
SpatialReference webMercator = SpatialReferences.getWebMercator();
// make a point in lat/long (WGS84)
Point centrePoint = new Point(-2.5,56, wgs84);
// project it to a mercator projection where the unit of measure is metres
Point mercatorPoint = (Point) GeometryEngine.project(centrePoint, webMercator);
// create an arc segment which is 50Kilometers radius, starting at 90 degrees, the arc angle is 45 degrees clockwise
EllipticArcSegment arcSegment = EllipticArcSegment.createCircularEllipticArc(mercatorPoint, 50000,Math.toRadians(90), Math.toRadians(-45), webMercator);
// make a part with the segment
Part part = new Part(webMercator);
part.add(arcSegment);
// create the line from the part
Polyline line = new Polyline(part);
// add it to a graphic and graphics overlay to allow us to visualise it
Graphic arcGraphic = new Graphic(line, lineSymbol);
graphicsOverlay.getGraphics().add(arcGraphic); The result looks like this: Does this help?
... View more
01-06-2022
10:22 AM
|
0
|
2
|
2014
|
|
POST
|
There a few things going on here. - Your layers have got no data yet so with the current API, you can only work with them in a map (this would allow you to add data for example). However once the layer is in a map you can access the table and layer information. - If the layers did have data (even it had been deleted) you would be able to load the tables and work with them directly. To show this I added a point and removed it again from layer #2 and you will notice this now loads. The workflows for using the API usually centre around displaying the data in a map. I really need to understand what you are trying to do here. Are you always going to be working with freshly created feature services which have no data? Once I understand what you are doing I can give you a solution or even make a change / improvement to the API to improve it for your workflow.
... View more
12-16-2021
07:10 AM
|
1
|
0
|
2223
|
|
POST
|
It depends on where the gdb came from. If it's a Runtime geodatabase for offline purposes it will certainly work. If it's a geodatabase straight from ArcGIS Pro, then you will have issues. If you explain a little about the workflow you are trying to achieve I'll point you in the right direction.
... View more
12-16-2021
06:55 AM
|
0
|
0
|
1458
|
|
POST
|
I've work out the issue. The service doesn't appear to show it spatial reference until it has some data loaded in. If it did, the table would load, but here a more robust approach which will work even if the service has no data: // create a map with the standard imagery basemap style
ArcGISMap map = new ArcGISMap(Basemap.createLightGrayCanvas());
// create a map view and set the map to it
mapView = new MapView();
mapView.setMap(map);
// connect to the feature server
String featureServer = "https://services1.arcgis.com/owfRSBecxmXo3S0X/arcgis/rest/services/roads_database_ver_411gdb20211207t151917z001/FeatureServer";
ServiceGeodatabase gdb = new ServiceGeodatabase(featureServer);
gdb.loadAsync();
gdb.addDoneLoadingListener(()-> {
System.out.println("gdb load status " + gdb.getLoadStatus());
ArcGISFeatureServiceInfo serviceInfo = gdb.getServiceInfo();
// list the layers
for (IdInfo idInfo : serviceInfo.getLayerInfos()) {
System.out.println("layer id = " + idInfo.getId() + " name = " + idInfo.getName());
// crude limit to which layers we load
if (idInfo.getId() < 5) {
// create table
ServiceFeatureTable table = new ServiceFeatureTable(featureServer + "/" + idInfo.getId());
// make feature layer from table
FeatureLayer featureLayer = new FeatureLayer(table);
// create a listen to report back that it worked
featureLayer.addDoneLoadingListener(()-> {
System.out.println(" layer load status " + featureLayer.getLoadStatus());
// assuming all is well try reading something from the table
if (featureLayer.getLoadStatus() == LoadStatus.LOADED) {
System.out.println("geometry type " + featureLayer.getFeatureTable().getGeometryType().toString());
}
});
// add the layer to your map
map.getOperationalLayers().add(featureLayer);
}
} Does this help?
... View more
12-15-2021
02:25 AM
|
0
|
0
|
2230
|
|
POST
|
There is something curious going on with those feature services and my initial attempt also failed to load. I'm going to take a closer look to see what is happening. Can you give me any information on how you created the service?
... View more
12-14-2021
11:15 AM
|
0
|
0
|
2237
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-13-2024 05:17 AM | |
| 1 | 07-10-2024 01:50 AM | |
| 1 | 04-22-2024 01:21 AM | |
| 1 | 04-18-2024 01:41 AM | |
| 1 | 12-05-2023 08:50 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-12-2025
07:13 PM
|