POST
|
import arcpy import pprint #from arcgis.gis import GIS #sign into portal arcpy.SignInToPortal(arcpy.GetActivePortalURL(), "**user", "**password") # Overwrite any existing outputs arcpy.env.overwriteOutput = True locator_path = "C:\\Users\\gisadmin\\Desktop\\Geocoders\\simplicity" sddraft_file = "C:\\locator_script\\simplicity.sddraft" sd_file = "C:\\locator_script\\simplicity.sd" service_name = "simplicity" folderName = "Geocoders" summary = "Address and Streets locator for the City of Asheville Simplicity Application" tags = "address, locator, geocode" access = "public" # The URL of the federated server you are publishing to in_server = "https://xxxx.ashevillenc.gov/server/rest/services/Geocoders/" # Create the sd draft file analyze_messages = arcpy.CreateGeocodeSDDraft(locator_path, sddraft_file, service_name, copy_data_to_server=True, folder_name=folderName, summary=summary, tags=tags, max_result_size=20, max_batch_size=500, suggested_batch_size=150, overwrite_existing_service=True) # Stage and upload the service if the sddraft analysis did not contain errors if analyze_messages['errors'] == {}: try: # Execute StageService to convert sddraft file to a service definition # (sd) file arcpy.server.StageService(sddraft_file, sd_file) # Execute UploadServiceDefinition to publish the service definition # file as a service arcpy.server.UploadServiceDefinition(sd_file, in_server) print("The geocode service was successfully published") except arcpy.ExecuteError: print("An error occurred") print(arcpy.GetMessages(2)) else: # If the sddraft analysis contained errors, display them print("Error were returned when creating service definition draft") pprint.pprint(analyze_messages['errors'], indent=2)
... View more
03-21-2023
05:49 AM
|
0
|
1
|
1411
|
POST
|
Hey Kayden, I meant a folder on portal that was shared publicly. My original was not. Hope you can get it working!
... View more
03-16-2023
02:52 PM
|
0
|
4
|
1448
|
POST
|
I ended up sharing it (in the script) to a folder that was public and now it's public.
... View more
06-27-2022
01:56 PM
|
0
|
6
|
1653
|
POST
|
Thanks for your potential help! I'm using the CreateGeocodeSDDraft script to overwrite my Locator on Portal which is working... except -- when it overwrites/publishes - the permissions are set to Private and I want it to be Public/Everyone. I can change it to Everyone/Public in Portal, or on the Server Manager - run the script - is published but it private. Any ideas? I've tried everything I can think of (there are some not called variables from all my attempts) here is the script I'm using import arcpy import pprint #sign into portal arcpy.SignInToPortal(arcpy.GetActivePortalURL(), "####", "####") # Overwrite any existing outputs arcpy.env.overwriteOutput = True locator_path = "C:\\Users\\gisadmin\\Desktop\\Geocoders\\simplicity" sddraft_file = "C:\\locator_script\\simplicity.sddraft" sd_file = "C:\\locator_script\\simplicity.sd" service_name = "simplicity" #shrOrg = True #shrEveryone = True #shrGroups = "" folderName = "Geocoders" summary = "Address ans Streets locator for the City of Asheville Simplicity Application!" tags = "address, locator, geocode" shared = True everyone ='true' orgs = 'true' groups = None shrOrg = True shrEveryone = True shrGroups = "" # The URL of the federated server you are publishing to in_server = "https://gisportal.asheville.gov/server/rest/services/Geocoders/" # Create the sd draft file analyze_messages = arcpy.CreateGeocodeSDDraft(locator_path, sddraft_file, service_name, copy_data_to_server=True, summary=summary, tags=tags, max_result_size=20, max_batch_size=500, suggested_batch_size=150, overwrite_existing_service=True) # Stage and upload the service if the sddraft analysis did not contain errors if analyze_messages['errors'] == {}: try: # Execute StageService to convert sddraft file to a service definition # (sd) file arcpy.server.StageService(sddraft_file, sd_file) # Execute UploadServiceDefinition to publish the service definition # file as a service arcpy.server.UploadServiceDefinition(sd_file, in_server) print("The geocode service was successfully published") except arcpy.ExecuteError: print("An error occurred") print(arcpy.GetMessages(2)) else: # If the sddraft analysis contained errors, display them print("Error were returned when creating service definition draft") pprint.pprint(analyze_messages['errors'], indent=2)
... View more
06-24-2022
02:35 PM
|
1
|
8
|
1786
|
IDEA
|
It would be really helpful if ArcGIS Pro supported windows authenticated enterprise geodatabase connections for AWS/RDS Postgresql. I imagine many organizations are moving to cloud based databases and this could potentially help many of us. Thanks for your consideration!
... View more
05-26-2022
09:23 AM
|
1
|
0
|
665
|
POST
|
Oh that’s really smart. I love arcade. Thanks for the great idea.
... View more
03-06-2022
05:51 AM
|
0
|
0
|
1508
|
POST
|
Hey @CalebAnderson no, I didn’t figure it out. Let me know if you do!!
... View more
03-02-2022
02:30 PM
|
0
|
0
|
1516
|
POST
|
I am building out some cards, and using the Dynamic Text feature, is it possible to build an expression that would do an If, Else with the dynamic data? I'd like to color code the data by the attribute. So If Status is "green" then the font color would be green. Is something like this possible? Thanks for your help!
... View more
08-20-2020
02:14 PM
|
1
|
5
|
1935
|
POST
|
Thank you! I'm so glad to connect with you LaToya. I would love to see and learn from your work. I should have mentioned that I'm still learning, and our project is still a work in progress, but thank you for looking at it. If we can collaborate or work together - I would love that. We are in early stages of mapping losses from Urban Renewal, but I think it's so important that we do it. Thank you for sharing, and I am so sorry that your family was affected and hurt by terrible policies. I'm glad you are a part of designing Richmond's master plan. Christen
... View more
06-12-2020
10:21 AM
|
1
|
0
|
3088
|
POST
|
Hi Everyone! It's wonderful to connect with you. I am Christen McNamara Watts and I'm the GIS Manager for the City of Asheville, NC. Asheville hired our amazing Equity & Inclusion Director, Kimberlee Archie in 2017 and I've been working closely with her & her team to use GIS to act on our City's 2016 resolution of "cultural diversity and social and economic equity are evident in all that we do." Recently, I've been working on a Broadband Access Gap analysis, which we believe will have a larger impact on existing Educational and Economic Opportunity Gaps during COVID-19. As well as working with a wonderful intern to map our African American historic landmarks from before Urban Renewal. Here is a link to a Story Map of some of our work so far: https://equitymap.ashevillenc.gov I'm excited to see what other folks are working on, I'm so glad to have this opportunity to connect. I would love to learn about how people are using GIS to support Business Inclusion efforts. I am also so interested in the Equity Indexes that have been created.
... View more
06-12-2020
06:11 AM
|
2
|
2
|
3088
|
POST
|
Thank you, that was super helpful! I wanted to restrict closure and completion dates to current and beyond and inserted this code into the layer description :"ClosureDate >= CURRENT_DATE() OR CompletionDate >= CURRENT_DATE()"
... View more
06-17-2016
08:18 AM
|
0
|
0
|
1785
|
Title | Kudos | Posted |
---|---|---|
1 | 06-24-2022 02:35 PM | |
1 | 05-26-2022 09:23 AM | |
1 | 08-20-2020 02:14 PM | |
2 | 06-12-2020 06:11 AM | |
1 | 06-12-2020 10:21 AM |
Online Status |
Offline
|
Date Last Visited |
05-31-2024
02:49 PM
|