POST
|
That worked for me, thank you. I actually saw that earlier, but didn't want to create a whole new polygon 'filter' layer to have to interface with and maintain--then I forgot about that solution. It doesn't look like there's a way to simply query by a set of coordinates or a specific latitude/longitude/xy threshold, though, so creating a filter layer to intersect with is good enough. I did mine easily using Map Notes in the ArcGIS Online webmap viewer, then saving that polygon layer permanently. Here's the full code in case anyone else stumbles upon this question: permanent_item = gis.content.get('<ITEM ID OF ORIGINAL HOSTED FEATURE SERVICE LAYER>') permanent_layer = permanent_item.layers filter_item = gis.content.get('<ITEM ID OF HOSTED FEATURE SERVICE BOUNDING AREA POLYGON>') filter_layer = filter_item.layers box_fset = filter_layer[0].query() box_geom_dict = box_fset.features[0].geometry box_geom = Geometry(box_geom_dict) box_filter = intersects(box_geom) permanent_fset = permanent_layer[0].query(geometry_filter=box_filter)
... View more
08-20-2020
09:37 AM
|
1
|
1
|
1143
|
POST
|
Try this: from arcgis.mapping import WebMap from arcgis.gis import GIS gis = GIS("home") item = gis.content.get('258ce2e9584843ab8c0efe991844c672') extent = [[-118.613114, 33.773435], [-118.00200, 32.215572]] # extent format: 'top left', 'bottom right' bounding box in WGS 84 Auxiliary Mercator decimal degrees item.update(item_properties={'extent': extent})
... View more
08-19-2020
08:36 AM
|
1
|
1
|
1073
|
POST
|
Hello, I've been using the Python API to batch-update records for hosted feature service layers on ArcGIS Online. To do this, I query the layer according to the API Syntax. One such example would be like this: search_item = gis.content.get('<ITEM ID AS A STRING>') # change this for every layer you run this on item_layers = search_item.layers item_layers[0].query(where="<ATTRIBUTE> = '<Example Data>' ") However, I'm dealing with a layer that has hundreds of thousands of points, and now I want to narrow the results by querying all of the points that are in a certain area. There is no other attribute field that universally describes the points in this area besides their location. There are latitude/longitude fields, but those fields happen to be empty in my case. How do I query points by location in the Python API syntax, using the point's actual location/the hidden 'Shape'/geometry field? A non-working example of what I want would be something like filtering out all points below a certain latitude, like 34.1°N, (assuming WGS 1984): item_layers[0].query(where="geometry.y > 34.1") I could also run Calculate Geometry on the point layer and then query by those fields, but running Calculate Geometry on all of the points would take as long as returning everything with a raw .query()--that is, not querying at all. I'm trying to avoid operating on all of the points, if possible. Thanks!
... View more
08-18-2020
02:53 PM
|
0
|
3
|
1234
|
POST
|
You will need to enable this setting in both Connect and the field app, and then you can use the Linked Content option in Connect for that survey to link a web map to your survey. This note about enabling Standard maps made all the difference between this not working and working for me, since in the official documentation for Linked Content so far, this is not mentioned. It's easy to get stuck trying to configure the survey settings and forget that there are also general Survey123 Connect user settings. Thank you!
... View more
07-09-2020
12:45 PM
|
0
|
1
|
4156
|
IDEA
|
I'm not sure when this was implemented, but it appears that the most effective solution is to change the contents pane view to 'List by Data Source'. This request has been fulfilled.
... View more
01-10-2020
01:35 PM
|
0
|
0
|
1027
|
IDEA
|
It'd be great if, in ArcGIS Pro, a layer would indicate if it was a hosted feature service. This is because I often pull copies of hosted feature service layers offline (or inversely, publish an offline layer), then work with both layers in the same project. I can easily get the two layers--which have the same name--confused. Furthermore, there have been times when I thought a layer was hosted when it wasn't or vice versa, which causes confusion. This is especially important since edits made to a hosted feature service layer can't always be undone. Here's a mockup picture of what this might look like if I published a layer, then added the hosted feature service version of that to the project afterwards:
... View more
06-28-2019
02:29 PM
|
4
|
4
|
1144
|
Title | Kudos | Posted |
---|---|---|
1 | 08-19-2020 08:36 AM | |
1 | 08-20-2020 09:37 AM | |
4 | 06-28-2019 02:29 PM |
Online Status |
Offline
|
Date Last Visited |
03-02-2021
04:15 PM
|