POST
|
I have finally gotten back to this, and I have read up on ServiceFeatureTable. They are AWESOME. They have completely solved my problem and avoided the need for an http request, and a JSON decode. I now get all that I need with a few lines of code. I'll be using this a lot in the future
... View more
09-28-2022
03:29 AM
|
0
|
0
|
714
|
POST
|
I do query by QueryFeaturesAsync (mostly) but in some performance related cases I use the .dbf file. The full connection string does include the directory name, but I only showed the bit that has the issue. When I use a dBase IV connection string, it works on the dBase IV .dbf that I created. I wish to use a connection string that works on the .dbf file that came with the .shp file.
... View more
09-23-2022
03:08 PM
|
0
|
0
|
784
|
POST
|
I am attempting to read the .dbf file associated with a .shp file to speed up the search for certain metadata, rather than querying the .shp file. I am having great difficulty formulating the correct connection string. I think that the .dbf files are in dBase III+ format, but I'm not sure. At run time I get an error when I open the .dbf file using the connection string below - "code -2147467259 - Unexpected error from external database driver (8961)". Any help in formulating the correct connection string would be much appreciated. In an act of absolute desperation, I have reconstructed a .dbf file by querying the .shp file and producing a .dbf that is dBase IV using the connection string below, and it works, but I'd like to access the .dbf without having to reconstruct the .dbf file. I am using an OleDbConnection connection. Dim BaseConnectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Mode=Read;Extended Properties=dBase IV;" Platform is Windows 10 64-bit
... View more
09-23-2022
07:19 AM
|
0
|
2
|
814
|
POST
|
Thank you for the suggestion. I am skeptical the performance issue is shapefile related for 2 reasons. 1. Under esriarcgisruntime 10.x there was no performance issue. Problem seems to be since 100.x 2. Querying seems to provide adequate performance. It is iterating the query result that is the issue. Even if the query result is no more than a series of pointers to the shapefile, the .Any property should not take 3 seconds, particularly when the result is empty - there is no shapefile access involved.
... View more
09-24-2021
06:04 PM
|
0
|
0
|
1219
|
POST
|
I suspect the FeatureQueryResult object is seriously broken. Not only is iterating it very slow, but the simple reference to the .Any property of the object takes 3 seconds, even if empty.
... View more
09-23-2021
02:11 AM
|
0
|
0
|
1230
|
POST
|
Curious observation. For QueryExtentAsync to work, .ReturnGeometry must be true, which is the default. The subsequent QueryFeaturesAsync call is now much faster, presumably because the geometry is already cached (which is pretty clever of it). Timings are now QueryExtentAsync = 2.5s, (OK I guess) QueryFeaturesAsync = ~0.5s (obviously some caching going on) Iterate the resulting FeatureQueryResult = 5s The use of a preceding QueryExtentAsync seems to have sped things up significantly, but iteration is still much slower than expected.
... View more
09-21-2021
08:01 PM
|
0
|
0
|
1237
|
POST
|
1. Shapefile is on local harddrive. 2. Spatial query (returning geometry). Elapsed time is only 1-2 sec, which seems reasonable. 3. Features are "complicated". All polygons between 1 and 40 of them. I was unaware of QueryExtentAsync. Using that, rather than iterating through the geometry, reduces the time from 10s to 3s. Still a little more than I would expect, and longer than it takes to retrieve the geometry. By exploiting QueryExtentAsync it has reduced my total processing time from 9 hours to 3 hours, so thank you for that. I am using the Shapefile that can be found at http://www.environment.gov.au/fed/catalog/search/resource/downloadData.page?uuid=%7B4448CACD-9DA8-43D1-A48F-48149FD5FCFD%7D. It is the ArcView Shapefile with terrestrial in the name. They also publish a GeoDatabase, but I have no experience with these. Would they be quicker? Just to explain my application. I run programs for Radio Amateurs (HAMs) where they can operate from either a park, or within 1km of a silo. There are 3000 parks, and they are many polygons in shape. They can also operate from within 1km of a silo, which is just a point. Being a greedy lot, they wish to know where they can operate from both at once. To find the intersection of all parks with all silos, is the typical N squared problem, so I have had to optimise the search strategy a bit. The current algorithm is: for each park (3000 of them)
get park extent (QueryExtentAsync)
add a buffer of 1km to park extent
SQL fetch all silos within that extent
for each candidate silo (usually 2-10)
Get park geometry for park if don't have it (QueryFeaturesAsync) already
Test for overlap with park (unbuffered) and silo with 1km buffer applied
next
next Your tip about QueryExtentAsync has made a significant difference to the performance, however, iterating through a FeatureQueryResult still remains excruciatingly slow. Returning the geometry only takes 1-2 sec, so it's hard to understand why iterating this collection to detect overlap takes so long.
... View more
09-21-2021
06:11 PM
|
0
|
0
|
1240
|
POST
|
I have a VB.net application that is using QueryFeaturesAsync to retrieve a FeatureQueryResult from a shapefile. It typically returns between 2 and 12 features. When I iterate through the result (for each fragment in FeatureQueryResult ) it takes forever - about 7-20 seconds. What I'm trying to achieve is to calculate the Extent of the FeatureQueryResult . I do this by iterating though the FeatureQueryResult and doing a CombineExtents for each individual result. Is there a way to do this without iterating? Why is it so slow?
... View more
09-21-2021
12:15 AM
|
0
|
6
|
1277
|
POST
|
The reason I'm not using ServiceFeatureTable class is I've never heard of them. Looks like I have some reading to do. Thanks.
... View more
08-23-2021
05:43 PM
|
0
|
0
|
1510
|
POST
|
I call many different RESTful GIS severs. A typical one is https://services.ga.gov.au/gis/rest/services/NM_Transport_Infrastructure/MapServer/4/query . The format parameter I'm using is geojson. So how am I supposed to parse whatever it is returning with ESRIArcGISRuntime?
... View more
08-23-2021
04:05 AM
|
0
|
0
|
1522
|
POST
|
I have, for years, been trying to get FeatureCollection.FromJson to work, but it just doesn't. I must be doing something simple wrong. I am using Microsoft Visual Studio Community 2019 (VB.NET), and latest Esri.ArcGISRuntime 100.11.2. I have a simple code fragment Dim fs As New FeatureCollection fs = FeatureCollection.FromJson(responseStr) responseStr contains the geojson string below. After execution, fs is empty with no runtime failure. I have had to resort to using the Newtonsoft.Json package to decode the json, which has no problem with it. What am I doing wrong? (How can something so simple be so hard?) {
"type": "FeatureCollection",
"crs": {
"type": "name",
"properties": {
"name": "EPSG:4326"
}
},
"features": [
{
"type": "Feature",
"id": 1158,
"geometry": null,
"properties": {
"objectid": 1158,
"featuretype": "Railway Station",
"type": 1,
"name": "ABERDEEN",
"railstationstatus": "Operational",
"featurereliability": 1103587200000,
"featuresource": "SP5PAN2P5_388415_21122004",
"attributereliability": 1189728000000,
"attributesource": "GEOSCIENCE AUSTRALIA",
"planimetricaccuracy": 10,
"revised": 1239667200000,
"gaid": null,
"stkehdrid": null,
"stkehdrname": null,
"upperscale": 5000000,
"uscertainty": "Definite",
"textnote": null,
"editcode": 88,
"symbol100k": 222,
"symbol250k": 222,
"symbolwac1mil": 2,
"symbol2_5mil": 2,
"symbol5mil": 2
}
}
]
}
... View more
08-21-2021
09:54 PM
|
0
|
5
|
1572
|
POST
|
I did the conversion to KML 'manually'. Wasn't too hard to determine polygon winding direction - used shoelace formula.
... View more
05-16-2020
09:59 PM
|
0
|
0
|
723
|
POST
|
I have a large number of adjacent polygons which I have reduced to a much smaller number of polygons using the ArcGIS REST API (union operation). I have the result in JSON. I have mostly OuterBoundary, but there will be a few InnerBoundary. How do I convert this to KML using the ArcGIS REST API? I don't wish to do it manually because of the inner/outer ring complication.
... View more
05-16-2020
07:45 AM
|
0
|
1
|
802
|
POST
|
Still not answered. GeometryEngine.GeodesicArea returns a positive number no matter the winding direction.
... View more
02-15-2019
10:37 PM
|
0
|
0
|
646
|
POST
|
Brilliant! It's easy when you know how. Solves problem completely. Thanks for getting me past my roadblock.
... View more
02-27-2018
02:28 PM
|
0
|
0
|
1210
|
Title | Kudos | Posted |
---|---|---|
1 | 05-09-2017 03:31 AM |
Online Status |
Offline
|
Date Last Visited |
3 weeks ago
|