POST
|
https://developers.arcgis.com/python/latest/api-reference/arcgis.features.toc.html#arcgis.features.FeatureLayer.query return_all_records Optional boolean. When True, the query operation will call the service until all records that satisfy the where_clause are returned. Note: result_offset and result_record_count will be ignored if return_all_records is True. Also, if return_count_only, return_ids_only, or return_extent_only are True, this parameter will be ignored. If this parameter is set to False but no other limit is specified, the default is True. sounds like a hierarchy of booleans, but the last line is confusing too,... so if no other limits are set it sets it back to True?..... I've used the .query and not set any of these and it return all records, even past the REST's MaxRecordCount another great advantage is the .save on the returned Feature Set to go right to Shapefile (not using the 'as_df=True') fl = FeatureLayer(_itemUrl) features = fl.query(where='Shape is not NULL') features.save(save_location=_pathShps, out_name=_friendlyName + '.shp')
... View more
2 weeks ago
|
0
|
0
|
51
|
POST
|
curious,....now that you are filtering out the bad geometry, can you go back to the .save method, without pandas .sdf fl = FeatureLayer(_itemUrl)
features = fl.query(where='Shape is not NULL', out_sr=26911)
# save to disk
print('saving the Feature Layer to Shapefile')
features.save(save_location=_pathShps, out_name=_friendlyName + '.shp')
... View more
2 weeks ago
|
0
|
0
|
53
|
POST
|
nothing like being 6 years late to the conversation, but I just discovered the easiest way to grab data from a REST end-point, with query option, and save as Shapefile from arcgis.features import FeatureLayer
# query the FeatureLayer to produce a FeatureSet
print('querying the Feature Layer')
fl = FeatureLayer(_itemUrl)
features = fl.query(where='Shape is not NULL', out_sr=26911)
# save to disk
print('saving the Feature Layer to Shapefile')
features.save(save_location=_pathShps, out_name=_friendlyName + '.shp')
... View more
2 weeks ago
|
0
|
0
|
39
|
POST
|
Is there an actual solution for this, not just Sure do! ?
... View more
08-13-2024
02:17 PM
|
0
|
0
|
261
|
POST
|
The gremlin has been exorcised! Yes, this was a real thing. After a maintenance day and a few server reboots (clustered environment), I can now use the proper and expected folder name for my tiles. I no longer have to rename the tile folder back to 'Layers'. Again,... yes this was a real thing. Somewhere in the bowels of either the Server config or these particular Services, it was forcing me to rename my cache folder to 'Layers' for the tiles to be recognized.....
... View more
02-26-2024
11:12 AM
|
0
|
0
|
1067
|
POST
|
Thanks for the response, I completely agree with your workflow, but something else is going on here. I have some gremlins in the system, figure this out...... I have an old cached service running for years, originally created from an mxd with the 'Layers' map frame. I completely delete the service. I recreate the service, in Pro (map name is not 'Layers'), I can make the service any random name I want and everything works as expected (after caching a few scale levels). If I name the service the same as the original name, the new cache is completely unusable until I rename the subfolder back to 'Layers'. I first thought that maybe the import into Pro and rename from Layers to a proper name didn't take, but I tried again with a new map and same thing. There's something about the original service name that insists that the cache folder be named 'Layers'. Tough for anyone to recreate so I'm not holding out for an answer, but maybe someone ran into this too.....
... View more
02-15-2024
10:13 AM
|
0
|
0
|
1125
|
POST
|
Can someone please explain the first 'Caution' message from here: https://enterprise.arcgis.com/en/server/10.9.1/publish-services/windows/accessing-map-and-image-cache-properties-in-manager.htm 'If you change the service name or map data frame name, you must manually rename the cache folder to match' what the....? In my scenario, I'm republishing everything from Pro, as we all are, and I am also leaving my old cache behind in favor of building a new one. The new cache dir is folder_servicename\mapname , but the old dir was folder_servicename\Layers...... To build the cache or stop/start the service I need the 'mapname' in the dir, but to use the service it needs to be 'Layers' in the dir. Is there any place to edit this setting or fix this 'bug'?
... View more
02-12-2024
01:34 PM
|
1
|
3
|
1237
|
POST
|
one of the layers I'm Merging is an in-memory Feature Layer. Field Mapping did not like this. I copied the data to a physical Feature Class and all is well. bug?....
... View more
10-23-2023
03:42 PM
|
0
|
0
|
614
|
POST
|
Hi, I'm finally converting 2x scripts to 3x and I'm getting poor results from the same code. Exact same code running under the two different environments, different results. Here is the code. Simple merge of three layers into one, mapping only one field. In 3x it will not populate the field from one of the layers. Works fine in 2x. What changed or what do I need to change in the new API. I should mention that for testing purposes, all FCs are in the same, new file geodatabase. fldFolio = arcpy.Field()
fldFolio.name = 'Folio'
fldFolio.aliasName = 'Folio'
fldFolio.type = 'Text'
fldFolio.length = 12
fldFolio.isNullable = True
fm = arcpy.FieldMap()
fm.outputField = fldFolio
fm.addInputField(PIDless_lyr, 'Folio', 0, 12)
fm.addInputField(target_ParcelsSingle, 'BCA_Legal_Folio', 0, 12)
fm.addInputField(target_ParcelsStrata, 'BCA_Legal_Folio', 0, 12)
fms = arcpy.FieldMappings()
fms.addFieldMap(fm)
# merge everything
print('Merge all Except MHs')
arcpy.Merge_management([PIDless_lyr, target_ParcelsSingle, target_ParcelsStrata], target_ParcelsTmp1, fms)
... View more
10-13-2023
02:14 PM
|
1
|
2
|
740
|
POST
|
Our IT has changed some of their back-end storage and are asking us to repoint the Server Directories. They did some IT magic so our old directories are still working and are technically the same location. They want us to change these directories to 'future proof' ourselves. Now to the question...... The documentation states that it will copy the contents to the new location.... any idea what happens when the location is the same, just a name change? https://enterprise.arcgis.com/en/server/10.8/administer/windows/editing-a-server-directory-in-manager.htm
... View more
07-24-2023
01:41 PM
|
0
|
0
|
362
|
POST
|
Hi, I went though support for this and they've logged some bugs BUG-000158005 - The default print service in ArcGIS Online stretches the color values of the image service in the print output. BUG-000158006 - The default printing tools in ArcGIS Server stretch the color values of the image service in the print output.
... View more
05-05-2023
09:26 AM
|
0
|
0
|
1893
|
POST
|
Some further notes.... Setting the Custom Rendering Options in ArcPro resolved the issue for my local testing, but then I applied the same Option to my Server, using the arcgis user, but to no joy. Are there environment settings that can be set within the script to change the behavior?
... View more
01-23-2023
11:45 AM
|
0
|
0
|
1996
|
POST
|
Hi Blake and others, I'm in the same boat. I recreated my ExportWebMap tasks using ArcPro and pagx files (NOT 3.x, server 10.8.1 won't be able to read them, learned that the hard way but that's another story) and the new tasks are returning Image Services with a Stretch Type. I can see its applying the standard Percent Clip but not sure why its not just leaving it alone as I have it published, as the old task does. I tried setting the Image Service with Allow Raster Functions: false, but it did not help. btw - my reason for upgrading the tasks was so the new ExportWebMaps can print the new Vector Basemaps. Was really pleased until I tried my own imagery....
... View more
01-20-2023
02:41 PM
|
0
|
0
|
2005
|
POST
|
Hi James, sure thing. Here is what I modified. The call from main to build_email will look like this. The build_email will return all three address (recipient) types: for row in rows:
address, address_cc, address_bcc, subject, body = build_email(row, lyr.properties.fields, message) In build_email I retrieve the three address types from the config file and call a new _get_email_values function. recipients = _get_email_values(row, fields, settings['recipient'])
recipients_cc = _get_email_values(row, fields, settings['recipient_cc'])
recipients_bcc = _get_email_values(row, fields, settings['recipient_bcc'])
..
..
..
return recipients, recipients_cc, recipients_bcc, email_subject, email_body I attached the _get_email_values as a txt. It is quite convoluted and can be simplified just to the top two lines if you wanted to (after .split(;)). The full function (aside from that it could be written better....) will either.... 1. return the address directly as in the config if it detects an '@' 2. get the address from the data if it detects that you used a field name 3. get the address from the data's domain if it detects that you used a field name and the field is a Domain Hope this makes sense, I found the _get_email_values a bit tough to read after leaving it for a few months. Dave
... View more
03-28-2022
12:07 PM
|
1
|
0
|
2044
|
POST
|
Hello, I'm having an issue where the browser (Chrome & Edge) is blocking the result of my Print Service within a Dashboard. The Print Service is operational and works in all other applications, including the application that is in the Dashboard (when opened independently). I can even copy and paste the url into a new browser and it works fine, but from within the Dashboard I receive ERR_BLOCKED_BY_CLIENT. Any ideas why the Dashboard is confusing the browser?
... View more
02-28-2022
03:26 PM
|
0
|
0
|
312
|
Title | Kudos | Posted |
---|---|---|
1 | 10-13-2023 02:14 PM | |
1 | 02-12-2024 01:34 PM | |
1 | 03-28-2022 12:07 PM | |
5 | 02-02-2022 03:47 PM | |
5 | 05-03-2021 09:41 AM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|