|
POST
|
I shared a feature class and a file geodatabase table to my Enterprise Portal as a web layer. I need to have both the feature class and the table in a web map. When I make a map with the new Map Viewer, the table is nowhere to be found. But when I use Map Viewer Classic, the table is in the map, just like I need. But I need to use the new Map Viewer because Map Viewer Classic is of course obsolete. I did confirm that both the feature class and the standalone table are listed in the map service's REST endpoint. There's no editing involved - no versioning, no feature service, etc. I am the owner of the web layer / service. And I am working on the web maps as myself, the same account that is the owner. I'm using ArcGIS Pro 3.0.3 Enterprise 10.9.1 build 28388 My organization cannot upgrade to Enterprise 11 yet. In fact, the work I am trying to do with this web layer is part of our work to get all our map services running from Pro, as part of our preparation for upgrading. So I have to get this work done before we can upgrade. I did see something on Esri Community from 2 years ago about related tables not showing up in the new map viewer, like Esri hadn't built this functionality yet. I don't know if this is related. A crazy thing is that on another Enterprise Portal we have (the Dev one), an essentially identical web layer with a table DOES show up in the new map viewer. That Portal has the exact same version and build as the one I'm having the problem with (which is our Production portal), and the services have the same settings. I don't see how the new map viewer could be acting differently in the two Portals, but it is. Does anyone know how to get the table to show up in Map Viewer? Is it a bug?
... View more
04-04-2024
01:00 PM
|
2
|
6
|
5097
|
|
POST
|
Hello, Does your sde connection use stored credentials or operating system authentication? If the latter, are you running the code as the user "sde"? For example, something I often do is right-click on an application, like ArcGIS Pro or Windows Command Prompt, select "run as different user," and then sign in as the desired account. You'd have to do something like this if the sde connection is operating system authenticated. I apologize if you already know this! On a different topic, I noticed that you're assigning the cursor to a variable. Just in case you're not familiar with this - I apologize if you are - you would then need to delete the cursor at the end of your code to avoid leaving a schema lock: del cur The more preferred way of dealing with a cursor is to use "with," and then you don't need to delete the cursor: with arcpy.da.InsertCursor(fc, fields) as cur:
... View more
03-28-2024
08:44 AM
|
0
|
2
|
4695
|
|
POST
|
Hello, Here is a function / code block I wrote that does what you're describing: def number_streets(street):
components = street.split(" ")
num = components[-1]
if len(num) == 1:
num = "-0" + num
else:
num = "-" + num
stname = " ".join(components[:-1])
result = stname + num
return result If you want to test it out, here's an example of how I tested it: sts = ["MY ST 1", "MY ST 2", "MY ST 10", "MY ST 41"]
for st in sts:
print(number_streets(st)) The results I got were: MY ST-01 MY ST-02 MY ST-10 MY ST-41 For a field calculation, the expression would be: number_streets(!YOUR_FIELD_NAME!) I'd be interested to hear if you use this and/or if it works for your purposes.
... View more
03-28-2024
08:26 AM
|
3
|
2
|
2707
|
|
POST
|
I'm also disappointed that Esri merch isn't online anymore and would love to see it come back!
... View more
02-22-2024
01:26 PM
|
6
|
0
|
7167
|
|
IDEA
|
I think this is a great idea! I can see a variety of use cases for it.
... View more
02-13-2024
10:43 AM
|
0
|
0
|
3095
|
|
POST
|
I am having this issue too. I want to generate thumbnails for feature classes' metadata in the Catalog, not just for a particular map. This was easy to do in ArcMap but I have not yet found out if it is possible in Pro. Regarding the previous post that mentions "generate thumbnail" is grayed out: This appears to be the case if, in your map/contents, the layer's metadata is set to "show metadata from data source (read-only)." But if you switch it to "layer has its own metadata," then the "generate thumbnail" button will be useable. However, I assume this thumbnail will only be for this one layer in this particular map, not for the source layer in the database. So that doesn't help me personally. I'll keep researching...
... View more
02-07-2024
11:16 AM
|
0
|
1
|
2077
|
|
POST
|
Hello! Welcome to the world of Python and arcpy! I learned Python by taking a Python classes at a community college; it was an online course. I took one course with a bad professor and was so discouraged, but then I took a class with a great professor and learned a lot and got confident. I'm so thankful for that class; I constantly use skills I got there. I feel it's super important to have a foundation in plain, non-GIS Python in order to do GIS/arcpy scripting - I could not have gotten far at all without learning about basic Python stuff like string manipulation, lists, slicing and indexes, creating and accessing dictionaries, creating functions, and writing loops (if loops, for loops). So I would highly recommend learning and practicing these things. In terms of self-paced learning and resources on general Python, I often end up looking at W3Schools Python websites... I know nothing about this organization, but I find their Python resources helpful. https://www.w3schools.com/python/ I also often find myself using Geeks for Geeks: https://www.geeksforgeeks.org/python-programming-language/ The website asks you sign in, but just close that pop-up; you don't have to sign in. Good luck!
... View more
02-05-2024
10:22 AM
|
0
|
0
|
6713
|
|
POST
|
Thank you very much, @JesseCloutier ! That definitely makes sense. 😊
... View more
01-30-2024
01:35 PM
|
1
|
0
|
2308
|
|
POST
|
Hi again @Jill_Saligoe-Simmel , The video was super helpful - thank you for suggesting it. It gave me a whole new understanding of metadata in ArcGIS, which helps in various ways with the metadata improvement project I'm working on at my organization. It would be very cool if there was an in-depth metadata training offered, as part of Esri's online self-paced tutorials. I see the main one available currently is for ArcMap. I might still do that one, though, just to beef up my knowledge in case some parts are relevant to Pro. Anyway, thanks again! I don't suppose you, or another metadata authority, will be at the 2024 Dev Summit?
... View more
01-30-2024
12:17 PM
|
0
|
0
|
2581
|
|
POST
|
I have a question about Esri Community; the question was sparked when I was looking at my badges. I thought I should have another badge for posting questions. So I found my "private stats," (see below) and it says I have posted zero questions. I guess when I post questions in communities like ArcGIS Pro Questions, it actually counts as starting a topic (?). This feels confusing because the discussion board is called "Questions." Yet in stats, it is "topics." That leads me to the question, if that doesn't count as questions, then what does? In what part of Esri Community are true "questions" posted?
... View more
01-29-2024
10:02 AM
|
0
|
4
|
2489
|
|
POST
|
I would be interested in hearing any suggestions for this task, too! My organization has a script that does basically the same workflow (but with only one geocoder), plus publishing a map service that's used in an app. I inherited the script from a past employee, and it's in Python 2. So now I have to rewrite it to work in Python 3 and ArcGIS Pro rather than ArcMap. The script is hundreds of lines, and I already know that simple one-to-one substitutions of Pro functions for ArcMap functions is not possible in this particular workflow. So I'd love to hear anything people have to share on this topic.
... View more
01-29-2024
09:48 AM
|
1
|
3
|
3990
|
|
POST
|
I figured out a way to do it! I wanted to share my solution here, in case it can help anyone else in the future. I wrote a Python script that used the Metadata class to access the xml file, and I read through the xml to determine what wording was used to indicate the metadata standard ("ArcGISProfile"). I did some string manipulation to grab the metadata standard (as well as the date the metadata was last updated), and I wrote all the feature class names and their metadata standard, date, and other metadata elements to a csv file, for easy sorting and examination. Here is the script; the part that gets the metadata standard is lines 41-55: """ Writes enterprise databases' feature classes' metadata elements, including metadata standard, to a csv file for use in determining which feature classes' metadata needs to be updated or put
into a different standard.
Python 3 / ArcGIS Pro
Allen Dailey
1/25/24
"""
import arcpy
from arcpy import metadata as md
import csv
# Desired file name for csv file. File can already exist, or not. If exists, will overwrite.
filename = r"\\path\to\csv_file.csv"
# Column names to use in csv file
columns = ["Database", "Dataset", "FeatureClass", "DateUpdated", "Standard", "Title", "Tags", "Summary", "Description",
"UseLimitations", "Credits"]
# List of enterprise database sde connections. Metadata elements will be obtained for each fc in each db.
db_sde_list = [r"List\of\my\ArcGISPro\database\sde\connections.sde"]
def get_metadata(db, dataset, fc_list, csv_writer):
""" Gets metadata elements for each feature class in a list and writes the metadata elements to a csv.
:param db: String, name of database, gotten from sde file path string
:param dataset: Name of dataset within the db, gotten from arcpy.ListDatasets()
:param fc_list: List, feature classes, generated by arcpy.ListFeatureClasses()
:param csv_writer: CSV writer
:return: None
"""
# For each feature class that has been passed into this function:
for fc in fc_list:
# Instantiate it as a metadata object
m = md.Metadata(fc)
# Get each of the usual metadata elements from the feature class's metadata
tt = m.title
tg = m.tags
s = m.summary
d = m.description
u = m.accessConstraints
c = m.credits
# Get the metadata standard from the xml file. First, access the xml.
x = m.xml
# Break the xml into a list of parts, in order to find the part that says the metadata standard
chunklist = x.split(">")
# Standard and date = empty string, to avoid error in case the next block doesn't work out in a particular case.
standard = ""
date = ""
# Go through each item in the list of parts of the xml file to find the standard
for i in range(len(chunklist)):
# "ArcGISProfile" is the field name for the metadata standard
if "ArcGISProfile" in chunklist[i]:
# The standard comes right after "ArcGISProfile."
standard = chunklist[i + 1].split("<")[0]
# Exit the loop to keep the correct content for the "standard" variable.
break
# Go through the xml to get the date metadata was last updated
for i in range(len(chunklist)):
if "mdDateSt" in chunklist[i]:
date = chunklist[i+1].split("<")[0]
break
# List containing all the data to be written to a row of the csv file
row = [db, dataset, fc, date, standard, tt, tg, s, d, u, c]
# Write the row to the file
csv_writer.writerow(row)
# Establish the csv file and csv writer
with open(filename, 'w', encoding="utf-8") as csvfile:
writer = csv.writer(csvfile)
# Write the column names to the csv file
writer.writerow(columns)
# For each database in the list, write its metadata elements to the csv file
for db in db_sde_list:
# Establish the database as the workspace in order to next access its datasets
arcpy.env.workspace = db
dbname = (db.split("\\")[-1]).split(".")[0]
datasets = arcpy.ListDatasets()
# If there are any standalone feature classes not inside datasets, get their names and their metadata
try:
lone_fcs = arcpy.ListFeatureClasses()
get_metadata(dbname, "", lone_fcs, writer)
except:
print(f"Has no standalone fc's: {db}")
for dataset in datasets:
ds_fcs = arcpy.ListFeatureClasses(feature_dataset=dataset)
get_metadata(dbname, dataset, ds_fcs, writer)
... View more
01-29-2024
09:39 AM
|
1
|
0
|
3841
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 2 | 2 weeks ago | |
| 1 | 09-17-2020 12:57 PM | |
| 1 | 3 weeks ago | |
| 3 | 09-30-2025 05:49 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|