|
POST
|
Hi Khadija, To get familiar with GeoEvent, I would recommend go through the Introduction Tutorials: https://www.arcgis.com/home/item.html?id=b6a35042effd44ceab3976941d36efcf For your use case you may find this tutorial on how to create/configure a Poll an External Website for JSON helpful as well: https://www.arcgis.com/home/item.html?id=b6a35042effd44ceab3976941d36efcfhttps://www.arcgis.com/home/item.html?id=b087b8193b55465cb94d4c451dd541ac As for working with MiX Integrate, it looks like to get started you'll need a client id, client secret, base url, and the endpoint for the operation you want to use (e.g. /api/events/assets/latest/{quantity}). Hope this helps, Earl
... View more
09-17-2019
07:50 AM
|
0
|
1
|
1018
|
|
POST
|
Hi Lino, Can you show us the previous lines that show what col is equal to? -Earl
... View more
09-17-2019
07:25 AM
|
0
|
3
|
2084
|
|
POST
|
Hi Devendra, Can you clarify which REST API operation(s) you are using? It seems like Create Replica—ArcGIS REST API: Services Directory | ArcGIS for Developers is at least one of them? If so, Create Replica has a 'geometry' parameter you may use for the purpose. -Earl
... View more
09-17-2019
06:41 AM
|
0
|
2
|
1861
|
|
POST
|
Hi Malik, I believe the underlying processes are pretty much the same, the only difference being that one tool is run by the server while the other is run by the client. I assisted someone not long ago who was seeing this same kind of behavior with both tools. From what you describe, it sounds like that white space may be within the 4096 pixel limit and that's what's going on. You mentioned the imagery was coming from topographic maps - I assume this white space is coming from the collars on those maps? If so, you might see if you can create a better mosaic using the manual or automated SheetCut workflow described here: http://proceedings.esri.com/library/userconf/proc15/tech-workshops/tw_409-119.pdf . You can try the Create Envelopes tool for the automated approach. -Earl
... View more
09-11-2019
07:27 AM
|
0
|
0
|
6053
|
|
POST
|
Okay, guess that theory panned out. Well, you can try your luck at running the Generate Tile Cache Tiling Scheme—Data Management toolbox | ArcGIS Desktop tool and then use the EXISTING options for service_type and tiling_scheme instead (pointing to the xml you generate). Hopefully, that produces the desired result - I'm not aware of a problem with that function so it'll be interesting to see what you find. -Earl
... View more
09-10-2019
01:17 PM
|
0
|
1
|
2740
|
|
POST
|
I would hazard a guess that maybe that scale's not being generated? You might extract the packages and compare their contents. I doubt there's a difference, but you might also export the result of running the 'Create Vector Tile Package' tool from the UI as a script to see if there's anything there. To me it seems like that level's not being generated though. -Earl
... View more
09-10-2019
12:20 PM
|
1
|
3
|
2740
|
|
POST
|
Hi Malik, Very likely what you are/were encountering is expected behavior. Please allow me to explain how the AOI functionality works. Two things often cause a bit of confusion on the Area of Interest feature: Scales are generated which exceed the extent of the Area of Interest - this results in the creation of low-resolution super tiles at smaller scales (smaller in GIS terms, e.g. 1:4,622,324). To not see super tiles you would simply create tiles for scales that more accurately capture the full extent of the Area of Interest. In general, seeing imagery outside of the Area of Interest is expected: https://enterprise.arcgis.com/en/server/latest/publish-services/windows/common-caching-questions.htm#anchor8. As explained in the documentation, "You should not see tiles created outside the boundary of your area of interest beyond 4,096 pixels in any direction." So, at any given scale there may be tiles created outside of the boundary boundary The 'bleed over' is very apparent if you create smaller scales as per #1. To better visualize the above points, consider NVIDIA's concept of Conservative Rasterization: From the above, it's easier to imagine that a super tile would be generated if the Area of Interest overlaps with its boundary. When one provides an AOI for a given scale, the caching tools will try to render an area of 4096x4096 pixel (no antialiasing) or 2048 x 2048 pixels (antialiasing) of the map at the scale provided and store the tiles on disk. If the AOI is smaller than the super tile, then the cache will be generated for the entire super tile regardless. In the above example, if one tries to generate cache for the State of Louisiana at L00 to L04 using the ArcGIS Online tiling scheme they would still see the entire world as the entire world can be rendered in 4096x4096 pixels at these levels. To ensure cache tiles are only being generated for the super tiles, one should use the scale within the range of the Area of Interest. For Louisiana, this would constitute level 8 (2311162.217) and above. At these levels, the super tile extents would be smaller than the Area of Interest. You can confirm the cache is generate up to 4096 x 4096 pixels around the state of Louisiana and no cache generated for the state of “Missouri” at Level 10: Note above that for L10, the shading ends before reaching Missouri. How about a more in-depth example? Suppose one loads the following feature classes into an MXD: Illinois substations (point) Illinois transmission lines (polyline) Illinois natural gas pipelines (polyline) State boundary (polygon). Everything is projected to EPSG: 3857. Here it is apparent that the State of Illinois is entirely visible at a scale of 1:3,711,017: Let's suppose this data is published as a Map Service and the below tiling scheme is defined: The scheme's minimum scale level is 7, or 1:4,622,324 - it was established earlier that the State of Illinois is visible at 1:3,711,017. Therefore, if using an Area of Interest it may not make sense to create scales lower than 1:288,895 or else you will see portions of State of Illinois when zoomed out: The cache is created and the Cached Map Service is loaded into the MXD. As expected, nothing in the service is visible at 1:609,711: However, zoom to the scale of the smallest scale that was generated (1:288,895) and you can see features. Here, notice that there are some tiles generated outside of the Area of Interest boundary. Again, this is expected and won't exceed 4096 pixels in any direction: For even greater confidence that the Area of Interest was honored and only the desired scales were generated, you can view the Status.gdb that is generated with the service's cache. You will typically find this File Geodatabase here: arcgisserver\directories\arcgiscache\<service name>\Layers Establish a folder connection to the cache directory and view the contents of the File Geodatabase: The most relevant Feature Classes are JobStatus and TaskStatus. Load one or both of these into the same MXD. From the Feature Class extents, it should be immediately apparent that tiles were only created for the Area of Interest: Furthermore, review the JobStatus Attribute Table to confirm that only the desired scales were generated: Hope this helps you and anyone else interested in knowing how the AOI functionality works! Kind regards, Earl
... View more
09-03-2019
07:59 AM
|
2
|
2
|
6053
|
|
POST
|
Hi Mike, You can do that like so: services = gis.content.search(query="NOT owner: username", item_type="Feature Layer", max_items=maxItems, outside_org=False) Hope this helps, Earl
... View more
07-27-2019
08:50 AM
|
2
|
2
|
2411
|
|
POST
|
It looks like outJson is a list - maybe this is being misinterpreted by addMessage which expects a string? What happens if you create a string from outJson? Or I guess you see what happens if you just pass in the JSON string item in the list that the method creates and see what that does (i.e. outJson[0])
... View more
07-19-2019
12:10 PM
|
1
|
1
|
1447
|
|
POST
|
Hi Lidia, The property you're looking for is userType. Valid values correspond to the userLicenseTypeId values described in REST API documentation: creatorUT | editorUT | GISProfessionalAdvUT | GISProfessionalBasicUT | GISProfessionalStdUT | viewerUT | fieldWorkerUT https://developers.arcgis.com/rest/enterprise-administration/portal/create-user.htm
... View more
07-05-2019
04:56 PM
|
2
|
1
|
6280
|
|
POST
|
Hi Greta, You may have already figured this out, but it looks like you missed 'spatial' - it should read: 'xx_sdf.spatial.to_featureclass' I see this working with the below example script using version 1.6.2 of the API. This particular example maintains the source projection: from arcgis import GIS
from arcgis.features import FeatureLayerCollection, GeoAccessor, GeoSeriesAccessor
from arcgis.geometry import SpatialReference
import pandas as pd
def search_item(conn, item_name, item_type, flc=False):
search_results = conn.content.search(item_name, item_type=item_type)
proper_index = [i for i, s in enumerate(search_results) if '"' + item_name + '"' in str(s)]
found_item = search_results[proper_index[0]]
if flc == False:
get_item = conn.content.get(found_item.id)
return get_item
if flc == True:
flc = FeatureLayerCollection.fromitem(found_item)
return flc
def main():
conn = GIS("https://www.arcgis.com", "Username", "Password")
flc = search_item(conn, "Name_of_Feature_Layer", "Feature Layer", True)
layer = flc.layers[0]
epsg_code = layer.properties['extent']['spatialReference']['latestWkid']
feature_set = layer.query()
sdf = feature_set.sdf
srs = SpatialReference({"wkid":epsg_code})
sdf.spatial.project(srs)
sdf.spatial.to_featureclass(location="/home/test.shp")
if __name__ == '__main__':
main() An alternative approach would be to use the fiona library instead of sdf to write the shapefile. The equivalent workflow is something like this: Get the EPSG code from the Spatial Reference in the Feature Layer properties (obtained as shown above). Run to_geojson on the Feature Set. Load and open the Feature Set geojson with fiona.ogrext.buffer_to_virtual_file Write to a new file using the Esri Shapefile driver: Here, I set the optional crs parameter equal to the result of Fiona's from_epsg with the EPSG code from before. Hope this helps! -Earl
... View more
07-03-2019
11:57 AM
|
1
|
1
|
3362
|
|
POST
|
Hi Weldon, You're in luck - I actually wrote on article on this exact topic not too long ago. I believe our content team is still working to make it public-facing, but I'll paste a copy for you below. This is a simple example that utilizes one of our sample GeoEvent Servers. The events are printed for illustrative purposes, but you may of course modify the function to process the received events however you wish: In order to use the subscribe method, you must have the following packages installed: autobahn, twisted, pyOpenssl, and service_identity. If you already have the ArcGIS API for Python installed, then you may already have some of the packages installed and just need to install twisted and autobahn: conda install twisted conda -c conda-forge install autobahn The subscribe method expects at minimum a callback function. The below sample illustrates how you can define a callback function that print events (JSON) as they come in. This is a very basic example - you could further manipulate the JSON to view only certain information or even perform additional processing/data analysis if desired. from arcgis import GIS
from arcgis.realtime import StreamLayer
import ssl, json
ssl._create_default_https_context = ssl._create_unverified_context
url = "https://geoeventsample1.esri.com:6443/arcgis/rest/services/AirportTraffics/StreamServer"
streamLayer = StreamLayer(url)
def callback(event):
event_as_json = json.loads(event)
print(event_as_json)
streamLayer.subscribe(callback) Note: This script may not run well in a Jupyter Notebook - if you run the code and decide to stop the script, the next time you attempt to run the script you may encounter errors like these: --------------------------------------------------------------------------- ReactorNotRestartable Traceback (most recent call last) <ipython-input-2-7cd591176ebd> in <module> 10 print(event) 11 ---> 12 streamLayer.subscribe(callback)
When this happens, restart the kernel and you should be able to re-execute. Otherwise, the script runs consistently from the command line. Kind regards, Earl
... View more
06-20-2019
04:25 PM
|
0
|
0
|
906
|
|
POST
|
Hi Toby, If I'm following you correctly, you might be looking to do a reclassify? Or perhaps you're wanting to perform Zonal Statistics—Help | ArcGIS Desktop ?
... View more
06-19-2019
08:07 AM
|
1
|
1
|
4584
|
|
POST
|
Hi Greta, Thank you for the additional information. The "IOPub data rate exceeded" error I've not encountered, but as far as I know that would only affect visualization of the output. What happens when you don't visualize the result immediately - does it this still fail? A few more questions: Can you tell us a bit more about the environment running the analysis? This looks to be a standalone anaconda installation on a Unix-like system. Do you notice any issues with performance when the analysis is running? Is anything spiking (CPU/RAM usage)? Approximately how many features are involved in the analysis? Is it feasible for you to share the source data for testing? -Earl
... View more
06-18-2019
07:09 AM
|
0
|
1
|
5781
|
|
POST
|
Hi there GIS Coordinator, I am going to guess that you are working with a Line/Polygon Feature Class stored in an Enterprise Geodatabase? I spoke earlier with Jeff about another customer's issues with a SQL Server Polygon Feature Class - it looks like the problem here is due to some reserved field names appearing in a dictionary used by exportToPDF. Please go ahead and contact Esri Support Services about being added to the defect log for the issue so you can closely track the status of a fix: "BUG-000123108: exportToPDF fails with "ValueError: Type names and field names must be valid identifiers: 'st_area()/'st_length()'" for SDE polygon and line feature classes." Unfortunately, there's not a clean way to fix this in your script as the problem lies in the arcpy library itself. However, you can work around the issue by: Using a File Geodatabase Feature Class instead. If using a File Geodatabase is completely out of the question, another option would be to: Create center points from the SDE Line/Polygon Feature Class using a tool like https://pro.arcgis.com/en/pro-app/tool-reference/data-management/feature-to-point.htm, storing the output in the same Enterprise Geodatabase as a point feature class Base the Map Series on the SDE point feature class instead (you can bury the Point FC behind other layers/make it completely transparent/etc. and remove it from Legend). The effect here will be that it'll look like the Map Series is based on the original Line/Polygon feature class. Hope this helps! -Earl
... View more
06-17-2019
01:38 PM
|
2
|
3
|
4190
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 01-18-2024 01:34 PM | |
| 1 | 09-13-2023 06:48 AM | |
| 1 | 09-23-2022 09:04 AM | |
| 1 | 06-14-2024 01:14 PM | |
| 2 | 09-24-2019 08:22 AM |