POST
|
Thank you!!! I looked for something like that but didn't see it. Way better way to look at code.
... View more
01-14-2025
11:43 AM
|
0
|
0
|
336
|
POST
|
I am trying to use a Python script to update data in a hosted feature layer from a csv file. The new data (csv file) uploads to the Enterprise Portal 10.9.1 as expected. I can truncate the data in the hosted feature layer as well. However, when I try to append the new data to the existing hosted feature layer, I get the following error: streetNamesData.append(item_id=newStreetsItem.id, upload_format="csv", source_info=para1, source_table_name=tableName, update_geometry=False) Exception: Error downloading item from Portal. (Error Code: 500) Python script is written in ArcGIS Pro 3.0.6 Python environment. Below is my code. import arcpy
import arcgis
from arcgis.gis import GIS
import os
import datetime as dt
# Variables
portalUrl = "thePortalUrl"
username = "myUserName" # Enterprise Username
password = "myPassword" # Enterprise Password
hostedStreetNamesItemId = "c1fb90623f47457ea0ee26a1256f2228" # Feature Service Item ID to update
# Local Feature Class name
runOnProd = True
sdeStreetNames = "KGIS.TRANS_STREETNAME"
# Environment Variables
arcpy.env.overwriteOutput = True
##############################################
#
# Get the current database SDE connection for test or prod
# based on the runOnProd flag
#
##############################################
def getSDEConnection():
if runOnProd:
return "prodConnection.sde"
else:
return "testConnection.sde"
if __name__ == "__main__":
# Create GIS object
print("Connecting to Enterprise")
gis = GIS(portalUrl, username, password)
# Create a filename with a timestamp for uniqueness
now_ts = str(int(dt.datetime.now().timestamp()))
tableName = "StreetNameExport_{}".format(now_ts)
filename = "{}\{}.csv".format(arcpy.env.scratchFolder, tableName)
csvTitle = "TEMP - {}".format(tableName)
# Get the street names table in SDE
sdeStreetNamesTable = "{}\\{}".format(getSDEConnection(), sdeStreetNames)
# Set the field mappings to only export the STREET_NAME field
fms = arcpy.FieldMappings()
fm_streetName = arcpy.FieldMap()
fm_streetName.addInputField(sdeStreetNamesTable, "STREET_NAME")
outFm_streetName = fm_streetName.outputField
outFm_streetName.name = "STREET_NAME"
fm_streetName.outputField = outFm_streetName
fms.addFieldMap(fm_streetName)
# Export the data to a csv file
arcpy.conversion.ExportTable(sdeStreetNamesTable, filename, "STREETNAME_STATUS = 1", "NOT_USE_ALIAS", fms)
newStreetsProperties={'title':csvTitle, 'description':'Temp CSV file for updating active street names' , 'tags':'temp'}
newStreetsItem = gis.content.add(item_properties=newStreetsProperties, data=filename)
# Get featureService/hostedTable layer to update
streetNamesLayer = gis.content.get(hostedStreetNamesItemId)
streetNamesData = streetNamesLayer.tables[0]
print("Truncating Existing Table")
print("Disabling Sync")
flc = arcgis.features.FeatureLayerCollection(streetNamesLayer.url, gis)
properties = flc.properties.capabilities
updateDict = {"capabilities": "Query", "syncEnabled": False}
flc.manager.update_definition(updateDict)
print("Truncating Feature Service")
streetNamesData.manager.truncate()
print("Enabling Sync")
updateDict = {"capabilities": properties, "syncEnabled": True}
flc.manager.update_definition(updateDict)
print("Appending features")
para1 = gis.content.analyze(item=newStreetsItem, file_type="csv")
streetNamesData.append(item_id=newStreetsItem.id, upload_format="csv", source_info=para1, source_table_name=tableName, update_geometry=False)
... View more
01-14-2025
10:55 AM
|
0
|
2
|
375
|
IDEA
|
I agree!! The other day while waiting or Pro to open I checked my email and waited, and waited, and waited for Pro to open. Finally I realized the "Sign In" dialog was on a second screen underneath my Outlook window. I will move the Pro window back and forth between screens depending on what I am working on (I tend to keep my primary task on the right screen...) and the dialogs always popping up on a different screens is annoying. And I agree with @ZachMoore, it isn't a bad idea, but it should be customizable.
... View more
10-19-2023
04:56 AM
|
0
|
0
|
1815
|
POST
|
Yeah, I have had a long discussion with support about this issue. True, a StreetAddress role will return a location but it's really not useful when it is a 1000 feet from the actual address location. Our street segments have theoretical address ranges not actual ranges. So, the range may be 4000-4099 but the real range only goes to 4024. This causes the StreetAddress point to be misplaced along the street segment. We have been using the FindAddressCandidates method (from 10.3 locators) to help users find ACTUAL address point - for years. We would take the returned address candidates and sort the results based on score and proximity to the entered house number (i.e. user enters 4231 [which doesn't exist] we would sort the results of actual address points as follows 4232,4229, 4231, 4228.....) This also allowed us to provide the user with additional info from the actual address points (parcel id, owner name, etc.) so they could select the correct address. We could also search/sort the results for other street names (user enters Broadway - we would show them the actual street names Old Broadway, N Broadway, & S Broadway). The new methodology breaks our existing apps, but we will adjust. Suggestions, which we have never used because they were kind of squirrely - ghost addresses and such, will help, but that too requires changes to the applications. We have discussed the new locators at length in the office and really find the changes....just strange. We were simply updating some processes that rebuild the locators every night and thought we would go ahead and move to the new Pro locators when we discovered the issue. Support has made it clear that it works as designed and that we should move to the new model. And we will, just not very quickly. Thanks for replying.
... View more
01-03-2023
05:36 AM
|
0
|
0
|
1099
|
POST
|
For everyone's info, I reported the issue to support back in Nov. 2022 and they have listed it as a bug. Here is the info: Bug number: BUG-000153603 Synopsis: ArcGIS Pro Locate pane returns a value with 1 space although the Value in the Reference Data from the custom locator with 2 spaces Status: New
... View more
12-22-2022
04:05 AM
|
0
|
0
|
523
|
POST
|
I am trying to migrate from our 10.3 style address locators to the new Pro 3 locators. In the 10.3 locators I could key in an address that doesn't exist (e.g. 4231 FOLEY DR) and get a list of potential address candidates. In the Pro style locators I get nothing unless I have the correct house number (e.g. 4232). I have tried to toggle several of the geocoding options but I never get a list of candidates. We have some applications that rely on the 10.3 style of candidates to present the user a list of potential matches. Am I missing a setting somewhere? Below are some screenshots showing the problem. Top example is from the 10.3 Address Locator. Bottom example if from the ArcGIS Pro Locator. 10.3 Address Locator Results ArcGIS Pro Locator Results
... View more
11-03-2022
08:13 AM
|
0
|
3
|
1136
|
POST
|
Thanks for the suggestions Shana. Unfortunately, both the POI role and the Feature Locator did the same thing and stripped out one of the spaces. I will open a support ticket. I am using ArcGIS Pro 3.0.2
... View more
10-26-2022
01:17 PM
|
0
|
1
|
998
|
POST
|
I am trying to create a locator to lookup parcels. Parcel ids in our system can have two blank spaces in the id (for example: 024--00302 where the hyphens are empty spaces i.e. 024 00302). When I create a locator for these values, ArcGIS Pro reduces the two spaces to a single space. The search box in Pro and other web applications will allow you to keyin both spaces, and it will find the value with a single space and include it in the suggestions. I can even locate the parcel on the map. However, the fact that it returns the parcel id with a single space causes problems for other downstream processes. Obviously, I can grab the value in my applications, check for the single space, and fix it programmatically but that doesn't work for everyone else. Is there a setting to force the locator to honor the multiple spaces? ArcGIS Pro 3
... View more
10-25-2022
12:19 PM
|
0
|
2
|
577
|
POST
|
We have parcel ids that have 2 spaces in the the middle of the id. For instance 001 001. The locators are trimming the multiple spaces to a single space and causing problems downstream. Since we can't modify the locator rules to account for this situation, how do we handle it? Or is there a locator style that already has support for multiple blank spaces?
... View more
10-25-2022
11:02 AM
|
0
|
3
|
2035
|
POST
|
I was experiencing the same issue - ArcGIS Pro 3.0.1. However, after much fussing and cussing, I cleared my graphics cache and the problem cleared up. Not sure this is the answer but I thought it might help someone else.
... View more
09-07-2022
07:06 AM
|
2
|
1
|
3018
|
POST
|
How do you search the API Reference Guide? It appears the text box for searching is missing.....
... View more
11-12-2021
12:48 PM
|
0
|
1
|
468
|
POST
|
We are looking at moving to ArcGIS Pro and ArcGIS Enterprise and started looking at rebuilding our map caches with Pro styles. I gotta say, I really like the quality of image that is created for cached tiles when published to Enterprise and built on the server. For our cache update process I was planning to use the Manage Tile Cache geoprocessing task on a different machine so we don't effect our production server. However, the map quality is different. Everything built with the Manage Tile Cache is a bit blurry and pixelated. I was expecting the tiles to match what is built on the server and be very close to what I see in Pro. Below is an example image. Areas in red boxes show image from Manage Tile Cache task. The rest of the map is from the cache built on the server.
... View more
02-11-2021
12:55 PM
|
0
|
1
|
1487
|
POST
|
I agree with Dan, I would expect the more you type the fewer candidates you see. I don't know who Dan works for but he seems to be in the same situation that we are. We really only need to search addresses across a few counties. 90% of the time we are only looking in one county and don't even use city, state, and zip values. We do have some situations where we need to find addresses across a utility district that may cover portions of several counties but I still don't see that as a problem. The existing tool handles addresses across the entire world, so addresses with subunits across 8 counties shouldn't be a big deal. No, I don't expect to scroll through 1000s of subunit addresses. I think this is a bad idea from both a performance and UI standpoint. We do have some locations with lots of subunits but most of the time it is a fairly short list. I had not considered the "100 Main St, My City, My State, Zip (150 units)" idea but it is a thought. And if I could click it and see the 150 units that would be handy. However, if you have to click it to simply see 2, 3, or 10 units it becomes more cumbersome than useful. I know this video doesn't come from an address locator but it does show some examples of subunits in our data set. Well, the video upload service isn't working right now so I will just include a link to the video: https://www.kgis.org/portal/portals/0/videos/misc/addresssubunits.mp4 Thanks for looking into this and I feel sure you guys will come up with something that works. Bryan
... View more
04-17-2020
05:41 AM
|
0
|
1
|
2702
|
POST
|
Dan McCoy is spot on in his reply. But another situation we currently have is some locations only have subunit addresses. The addressing folks are looking at changing this in the future but for now it is allowed and it exists. The Clinch address is a good example. If you look at the screen shot a few items back you will see that 2020 Clinch Ave only has unit addresses. So if the units don't show up in the suggestions then the user would never know it was a valid address.
... View more
04-16-2020
06:28 AM
|
1
|
5
|
2521
|
POST
|
No. Our need/use of ArcGIS Pro has really dropped at this point (we are sticking with ArcMap for the short term) so it isn’t a huge deal right now but we need the ability to search for unit level addresses. Thanks for checking back, Bryan
... View more
04-03-2020
05:15 AM
|
0
|
0
|
2521
|
Title | Kudos | Posted |
---|---|---|
2 | 09-07-2022 07:06 AM | |
1 | 07-25-2019 05:47 AM | |
1 | 04-16-2020 06:28 AM | |
2 | 08-01-2019 07:05 AM |
Online Status |
Offline
|
Date Last Visited |
01-29-2025
09:58 PM
|