IDEA
|
Hi, You can assign a short key to open definition query. Go to Project > Options > Customize the Ribbon > Choose command from > Select All commands and search: Build Definition Query. Under Accelerator set Ctrl+Q as example. See screenshot below: Now you can open quickly definition queries windows after selected layer in the TOC using Ctrl + Q. Hope this help you, Best regards, Fred
... View more
06-14-2023
11:54 PM
|
0
|
0
|
319
|
POST
|
Hi wavey, Why not simply use tool XY to lines ? import arcgis
input_table = r'C:\temp\sample_vals.csv'
out_lines = r'C:\temp\Default.gdb\sample_vals'
# XY To Line
arcpy.XYToLine_management(input_table, out_lines, "start_x", "start_y", "end_x", "end_y", "PLANAR","","NAD_1983_StatePlane_Texas_North_Central_FIPS_4202_Feet" ) Best regards, Fred
... View more
06-14-2023
01:00 AM
|
1
|
1
|
1397
|
POST
|
Hi Yockee, From ArcCatalog you can use this tool Calculate Default Spatial Grid Index or refer to this article Guidelines for choosing a spatial index grid size Hope this help you, Best regards
... View more
11-29-2022
06:48 AM
|
0
|
0
|
368
|
POST
|
Hi, Could you tell me the service name? Is it starting with a number rather than a letter? Best regards, Fred
... View more
09-01-2022
01:57 AM
|
0
|
0
|
326
|
POST
|
Hi @Clubdebambos , Perfect ! Thank for your update, Have a good day, Fred
... View more
07-05-2022
03:06 AM
|
0
|
0
|
556
|
POST
|
Hi bangminli, To create random points you should use Create Random Points (Data Management) Hope this help you, Best regards, Fred
... View more
07-05-2022
02:50 AM
|
0
|
1
|
399
|
POST
|
Hi Clubdebambos, From ArcGIS Pro Notebook I can run successfully a user report using your method. Maybe check: - ArcGIS Pro version 3.0 - Create a new python env, - From Pro are you connected to your AGOL account. Hope this help you, Fred
... View more
07-05-2022
02:23 AM
|
0
|
2
|
560
|
POST
|
Hi, I solve this issue restarting Portal for ArcGIS Windows services. Hope this help you, Best regards, Fred
... View more
12-03-2021
07:23 AM
|
1
|
1
|
3359
|
POST
|
Hi, Try complete script below: ############# Get logged in and set up ###############
import os
import shutil
from arcgis.gis import GIS
PortalUrl = "https://www.arcgis.com"
username = ""
password = ""
FeatureLayerID = "e5c2bdc5755e4e21ab578550f2fa12a3"
SavePath= r"C:\Users\cschooley\Documents\Work\Heritage\Photos"
################# End Set-up #######################
if username == "" and password == "":
gis = GIS()
else:
gis = GIS(PortalUrl, username, password)
FeatureLayer = gis.content.get(FeatureLayerID)
layer = FeatureLayer.layers[0]
layer.attachments.download(oid = 1, save_path=SavePath)
################# Copy image #######################
for root, dirs, files in os.walk(SavePath):
for f in files:
if f.endswith('.jpg'):
print("Copy jpg: {0}".format(str(f)))
pathOriginal = os.path.join(root,f)
pathTarget = os.path.join(SavePath,f)
if os.path.exists(pathTarget):
pathTarget = pathTarget[:-4] + "_copy" + pathTarget[-4:]
shutil.copyfile(pathOriginal, pathTarget)
### remove folders into Photos if you want
for d in os.listdir(SavePath):
if os.path.isdir(os.path.join(SavePath,d)):
shutil.rmtree(os.path.join(SavePath,d)) Hope this help you, Regards, Fred
... View more
05-28-2021
12:04 AM
|
1
|
1
|
2694
|
POST
|
Best way is to check if jpg name exist before copy it. See https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/checking-for-existence.htm
... View more
05-27-2021
08:30 AM
|
0
|
3
|
2709
|
POST
|
Hi cshooley, Maybe you can used this workaround with os and shutil module to copy jpg after downloaded at Photos dirname as below : ############# Get logged in and set up ###############
import os
import shutil
from arcgis.gis import GIS
PortalUrl = "https://www.arcgis.com"
username = ""
password = ""
FeatureLayerID = "e5c2bdc5755e4e21ab578550f2fa12a3"
SavePath= r"C:\Users\cschooley\Documents\Work\Heritage\Photos"
################# End Set-up #######################
if username == "" and password == "":
gis = GIS()
else:
gis = GIS(PortalUrl, username, password)
FeatureLayer = gis.content.get(FeatureLayerID)
layer = FeatureLayer.layers[0]
layer.attachments.download(oid = 1, save_path=SavePath)
################# Copy image #######################
for root, dirs, files in os.walk(SavePath):
for f in files:
if f.endswith('.jpg'):
print("Copy jpg: {0}".format(str(f)))
pathOriginal = os.path.join(root,f)
pathTarget = os.path.join(SavePath,f)
shutil.copyfile(pathOriginal, pathTarget)
### remove folders into Photos if you want
##for d in os.listdir(SavePath):
## if os.path.isdir(os.path.join(SavePath,d)):
## shutil.rmtree(os.path.join(SavePath,d)) Hope this help you, Best regards, Fred
... View more
05-27-2021
12:47 AM
|
1
|
6
|
2718
|
POST
|
Hi YeshiWangchuk, To copy sde database and schema to file gdb, you can base on this doc There are a number of reasons and multiple workflows available for making copies of a geodatabase. Here are a few common cases. Make a simple copy of a geodatabase, for example, to copy a file geodatabase. Make a copy of a geodatabase from one type to another, for example, to copy an enterprise geodatabase to a file geodatabase. Users need to make replica copies to use in version-based workflows and replication scenarios. For example, multiple offices in an organization may be geographically distributed, and each requires a synchronized (up-to-date) copy of the geodatabase. Perhaps each office maintains data for its geographic region and periodically shares its updates with other offices. In this case, you will use geodatabase replication. This set of capabilities provides tools for working with distributed enterprise geodatabases. See Understanding distributed data for more information. Hope this help you, Best regards, Fred
... View more
05-06-2021
12:15 AM
|
2
|
0
|
2783
|
POST
|
Hi Jared, It's strange because from ArcGIS Pro 2.7.2 on my environment there is no problem. See result below:
... View more
04-16-2021
02:13 AM
|
0
|
1
|
2315
|
POST
|
Hi Jared, Can you say me if modified python script solve this problem? Best regards, Fred
... View more
04-13-2021
11:47 PM
|
0
|
3
|
2343
|
POST
|
Hi Jared, First check if "Allow data to be copied to the site when publishing services" is actived under server/manager/site.html > data stores > settings. Second use following modified python code: from arcgis import GIS, features
#Connection to ArcGIS Enterprise Portal running 10.8
gisE = GIS(url='', username='', password='', verify_cert=False, trust_env=False)
cm = gisE.content
#Add CSV to ArcGIS Enterprise
item = cm.add(item_properties={
'title' : 'VaccineCurrent2',
'tags' : 'test',
'type' : 'CSV'}, data=csv_file)
item_id = item.id
print(item_id)
publish_params = {
'type': 'csv',
'latitudeFieldName': 'Latitude',
'longitudeFieldName': 'Longitude',
'locationType': 'coordinates'
}
#Publish
pitem = item.publish(publish_parameters=publish_params) Hope this can you, Best regards, Fred
... View more
04-12-2021
06:53 AM
|
0
|
0
|
2358
|
Title | Kudos | Posted |
---|---|---|
1 | 06-14-2023 01:00 AM | |
1 | 03-12-2021 08:48 AM | |
1 | 12-03-2021 07:23 AM | |
1 | 05-28-2021 12:04 AM | |
1 | 05-27-2021 12:47 AM |
Online Status |
Offline
|
Date Last Visited |
2 weeks ago
|