|
POST
|
As Dan already mentioned, this general approach will fail when there are other number sequences in the string. For example, an address like "100 South 900 West" will return "100900" with this approach.
... View more
01-16-2023
01:35 PM
|
0
|
0
|
2958
|
|
IDEA
|
I just tried your example on Pro 3.0.3, and I get "An invalid SQL statement was used" error. I am able to create the tables and create the view, but I can't add it to a map. Are you able to script out your steps so I can try running the code exactly the same way because something in our workflows is obviously different if it works for you but I get an error.
... View more
01-16-2023
01:28 PM
|
0
|
0
|
3466
|
|
IDEA
|
@Bud , regarding your specific query (excluding the LIMIT aspect of it), the query doesn't work because of limitations with SQL joins with file geodatabases. At least for the File Geodatabase API, Esri has always listed 2 known issues: GitHub - Esri/file-geodatabase-api: ... The File Geodatabase C++ API for Windows, MacOS and Linux Known Issues Concurrent access from Windows and Linux clients to the same File GeoDatabase can corrupt data. This combination should be avoided. SQL joins are not supported. It is likely that limitation in the FGDB API isn't just an FGDB API limitation, i.e., file geodatabases overall do not support SQL joins. Is a bullet point on a GitHub page sufficient documentation? I don't think so, I am guessing you don't think so, but it seems Esri does think so since they haven't materially improved their FGDB SQL documentation for many years.
... View more
01-16-2023
10:20 AM
|
0
|
0
|
3478
|
|
POST
|
Using the pseudo-code directly from page I link to: # Codeblock
def takewhile(predicate, iterable):
for x in iterable:
if predicate(x):
yield x
else:
break
# Expression
"".join(takewhile(str.isdigit, !FULLNAME!))
... View more
01-16-2023
09:59 AM
|
1
|
0
|
2978
|
|
POST
|
This isn't an issue with ArcGIS Pro, so maybe it is time to switch? Seriously though, the clock is ticking on ArcMap, and the clock long stopped for Python 2. For Python 2 (I would not recommend for Python 3), you could consider changing the default standard output to UTF-8 at the start of your script: import sys
import codecs
sys.stdout = codecs.getwriter("utf8")(sys.stdout) Prior to Python 3.6, Python used the ANSI APIs to interact with the Windows OS, which usually meant cp437 for English and many other locales. As you discovered, the euro symbol is not part of cp437, hence the error when trying to print or write from Python 2.7.14.
... View more
01-16-2023
09:45 AM
|
1
|
1
|
2186
|
|
POST
|
Several ways to go about it depending on how clean and/or complicated the data are in text fields. You can use itertools.takewhile() or just adopt the pseudo-code from it.
... View more
01-16-2023
09:01 AM
|
0
|
2
|
2993
|
|
IDEA
|
@JohannesLindner, I don't see people stumbling into the Helper functions, a user has to actively select it or type it in. If people are using Helper functions they know nothing about, that isn't a regular expression problem, that is a user problem. If potential audience size is a strong determining factor, how did ".as_integer_ratio" get put in the list? Also, Esri has introduced some hand-rolled Helpers like Sequential Number, which can have unexpected outcomes, so I can't see what issues there would be with adding a tried-and-true Python module.
... View more
01-12-2023
10:35 AM
|
0
|
0
|
3075
|
|
IDEA
|
I have been working with QGIS more, and one aspect I find really handy with that Field Calculator is the support for a few common regular expression string functions (regexp_matches, regexp_replace, regex_substr) natively within the dialog. I think having something similar in ArcGIS Pro's Calculate Field would be useful, but I also realize the implementation in Pro could not take the same form as in QGIS. After thinking about how various functions are implemented in Calculate Field currently, I think the simplest way to make regular expression use easier would be to add a few "re" Helpers in the Calculate Field dialog similar to how "math" Helpers are added. I realize someone can import re into a code block and define a function there and use regular expression, but I also think having re.findall, re.split, and re.sub usable in the Expression block via a Helper would make using regular expression more accessible to more users. If this were to be considered, I know the likely outcome would be using "re" since it is a native/core library, but it does look like Pro already comes bundled with "regex", and I have to say I find "regex" much better at portable Unicode syntax than the "re" library.
... View more
01-12-2023
08:12 AM
|
2
|
3
|
3121
|
|
POST
|
For two server roles, there definitely needs to be two authorization codes. Whether it is one license file with two codes or two license files with one code each is up to whoever is doing the licensing provisioning in My Esri.
... View more
01-10-2023
05:31 AM
|
0
|
2
|
2717
|
|
BLOG
|
Thanks @JesseCloutier for the note, appreciate it. I know I have been significantly less active the past couple or few years, but I still try to engage when I can find time. There are several reasons I am less active, but one of them is the not-so-new platform that EC is on when it changed from GeoNet to EC. I know the older platform had its fair share of issues, but the loss of Jive Streams was probably the biggest. I find managing the streams of content on EC without Streams just too clunky, and I end up getting frustrated sifting chaff to find what I really want to focus on. I know you are too new to understand what I am talking about it, but I never miss an opportunity to bring up this missing functionality in EC currently. And no, EC subscriptions are a poor alternative. Cheers.
... View more
01-05-2023
11:36 AM
|
18
|
0
|
49989
|
|
POST
|
If you are using ArcGIS Pro, which you should be by now, then 7.1.1. Formatted String Literals - Python 3.11.1 documentation are your friend. Try: expression = f"reclass(!{widthField}!,!{lengthField}!,!{num}!)"
... View more
01-05-2023
09:29 AM
|
1
|
4
|
3391
|
|
POST
|
Not sure how it could get much simpler. If the passing of field names is removed, the code boils down to: ', '.join([str(i) for i in [ ] if i]) That is pretty simple and compact. The bulk of the line is in field names, and you can't remove them.
... View more
01-02-2023
08:13 AM
|
0
|
0
|
945
|
|
POST
|
You are having a text encoding issue. See geopandas.read_file -- GeoPandas 0.12.2 documentation: Notes The format drivers will attempt to detect the encoding of your data, but may fail. In this case, the proper encoding can be specified explicitly by using the encoding keyword parameter, e.g. encoding='utf-8'.
... View more
01-02-2023
08:07 AM
|
0
|
0
|
3460
|
|
POST
|
@RachelGomez , the original question had to do with ArcPy cursors and not computer mouse cursors, so checking hardware and mouse and trackpad settings would have no effect.
... View more
01-02-2023
07:58 AM
|
1
|
0
|
2654
|
|
IDEA
|
Esri has a bigger problem with that documentation you reference because ArcObjects has nothing to do with ArcGIS Pro. According to ArcObjects Help for .NET developers (ArcObjects .NET 10.8 SDK), "ArcObjects is a library of Component Object Model (COM) components that make up the foundation of ArcGIS [Desktop/ArcMap]." The ArcGIS Pro SDK for .NET is a completely different SDK than ArcObjects SDK, and there is a chance the code examples don't even transfer over. It looks like Esri got sloppy and just fork-lifted the Desktop document over as Pro documentation.
... View more
12-23-2022
07:53 AM
|
0
|
0
|
3558
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Friday | |
| 2 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 2 | 06-05-2026 10:30 AM | |
| 1 | 05-29-2026 08:22 AM |
| Online Status |
Online
|
| Date Last Visited |
yesterday
|