|
POST
|
If you just use datatype="GPKMLLayer", the tool will accept a KML layer in the map from the dropdown, or a .kml/kmz file from the file dialog. You'll be able to select a non .kml/kmz file in the file dialog, but the tool will show a validation error: param0 = arcpy.Parameter(
displayName="Input KML/KMZ File",
name="input_kml",
datatype="GPKMLLayer",
parameterType="Required",
direction="Input",
)
... View more
12-22-2021
01:37 PM
|
0
|
0
|
3079
|
|
DOC
|
There is no "clone" for ArcGIS 10x desktop python, it uses a basic standalone C Python system install, not a conda env. You just need to point pycharm at the correct interpreter C:\Python27\ArcGIS10.[X]\python.exe
... View more
12-21-2021
09:11 PM
|
0
|
0
|
21182
|
|
POST
|
You can't extract any python scripts from this addin because you don't have a python addin, you have a compiled .NET addin. As the addin wasn't written in python, there are no python scripts to extract. Bascially there's nothing you can do other than getting hold of the .NET source code from whoever wrote it (or trying to decompile which is not guaranteed to give you usable code), editing the .NET code and then trying to recompile.
... View more
12-21-2021
12:20 AM
|
1
|
1
|
2733
|
|
POST
|
Are you saying you have a tif with the values as written text from a scanned map and you want to extract those text values to points with numeric values? I don't think that is feasible. I agree with @JayantaPoddar you might have to digitise manually.
... View more
12-20-2021
02:01 PM
|
1
|
0
|
4503
|
|
POST
|
.esriaddin files are just zip archives. To make changes, just unzip (you may need to rename from .esriaddin to .zip depending on your zip software), edit your files and then zip up again (renaming from .zip to .esriaddin if required). When you zip up again, if your zip software extracted to a new folder, zip everything in the folder, not the folder itself.
... View more
12-20-2021
01:53 PM
|
0
|
1
|
2742
|
|
POST
|
Troubleshooting Performance Issues in ArcGIS Pro makes me think turning off geoprocessing history logging might help. Try: arcpy.SetLogMetadata(False)
arcpy.SetLogHistory(False)
... View more
12-08-2021
10:08 PM
|
1
|
0
|
3581
|
|
IDEA
|
Looks like you can use ssl.enum_certificates to fetch certs. Here's an example using ArcGIS Pro 2.8 arcgispro-py3 env (which includes the cryptography package v 2.8): import ssl
from cryptography import x509
from cryptography.hazmat.backends import default_backend # cryptography < 3.1 https://cryptography.io/en/latest/faq/?highlight=backend#what-happened-to-the-backend-argument
for store in ["CA", "ROOT", "MY"]:
for cert, encoding, trust in ssl.enum_certificates(store):
certificate = x509.load_der_x509_certificate(cert, backend=default_backend()) # cryptography < 3.1
# certificate = x509.load_der_x509_certificate(cert) # cryptography >= 3.1
print(certificate.issuer, certificate.not_valid_after)
... View more
11-10-2021
02:37 AM
|
0
|
0
|
7797
|
|
POST
|
Works for me. With a very large string field in my GeoJSON, I get a default width of 8000 in the output FGDB featureclass. With an Esri JSON file, the field length is explicit, so you can set it to whatever length you need before running JSONToFeatures. "fields":[{"name":"some_attribute","type":"esriFieldTypeString","alias":"some_attribute","length":15000}]
... View more
10-29-2021
11:23 PM
|
0
|
0
|
2719
|
|
POST
|
arcpy.JSONToFeatures_conversion(jsonFile, Temp_or_InMemory_featureClass)
arcpy.Append_management(
Temp_or_InMemory_featureClass, output_featureClass,
schema_type="NO_TEST",
field_mapping="your field mapping") Tip - try without schema_type and field_mapping. If it works then no need to specify those optional parameters, otherwise run the Append manually and copy the python snippet for it from the results window to get the appropriate field mapping string.
... View more
10-28-2021
05:44 PM
|
0
|
2
|
2741
|
|
POST
|
@tigerwoulds wrote: This is what I've tried so far, but I need to be able to use the variable 'b' in my execute function. You don't. You just use parameters[3].valueAsText in your execute function.
... View more
10-28-2021
05:41 PM
|
0
|
1
|
4624
|
|
IDEA
|
@Thomas_Z1 wrote: ArcGISPro.exe is obviously not a Python interpreter. Don't be so sure... https://docs.python.org/3/extending/embedding.html
... View more
10-28-2021
01:43 AM
|
0
|
0
|
4825
|
|
POST
|
@tigerwoulds wrote: Sounds like I will need to use a Python Toolbox over a Script Tool. No you can still use a script tool. They support validation code. https://pro.arcgis.com/en/pro-app/latest/arcpy/geoprocessing_and_python/understanding-validation-in-script-tools.htm
... View more
10-28-2021
01:36 AM
|
0
|
1
|
4649
|
|
POST
|
@RPGIS wrote: Ok so, if I understand this correctly, is that a script and module are technically one in the same and that nesting multiple modules is not possible. Yes a script and module are both just a single python file, it's more a matter of convention that scripts contain code that gets executed and modules usually just contains functions, classes and constants that are imported by other modules and scripts. @RPGIS wrote: However, nesting multiple classes is possible. Here is what I was originally thinking. def sample(a):
b = a
return b
def example(c):
c = l
# do something
return c That is a function with a nested function, not a class. What you have there will not work. The example function can only be called from within the sample function but you return a from the sample funcction without doing anything with the example function. Try and run that example and call example('something') you'll get a NameError: name 'example' is not defined I think you should read up on "namespaces" before you start trying this sort of thing.
... View more
10-19-2021
01:24 AM
|
0
|
1
|
7973
|
|
POST
|
A module is always a single python file (which can contain multiple classes and functions inc. nested classes and functions). You can't nest modules per se. You can create a package though, which is a directory with an __init__.py and other .py files, and optionally nested sub-directories each with an __init__.py and other .py files (ignoring the newer "namespaces packages" which I don't know much about). From the doc: sound/ Top-level package
__init__.py Initialize the sound package
formats/ Subpackage for file format conversions
__init__.py
wavread.py
wavwrite.py
aiffread.py
aiffwrite.py
auread.py
auwrite.py
...
effects/ Subpackage for sound effects
__init__.py
echo.py
surround.py
reverse.py
...
etc... When you import os.path or arcpy.sa etc... this is using a subpackage.
... View more
10-16-2021
01:43 AM
|
0
|
3
|
8004
|
|
POST
|
Your csv contains projected coordinates. What projection/coordinate system are they in?
... View more
10-09-2021
11:42 PM
|
0
|
1
|
3768
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-24-2022 03:08 PM | |
| 1 | 07-30-2025 03:00 PM | |
| 1 | 06-10-2025 08:06 PM | |
| 5 | 05-20-2025 07:56 PM | |
| 1 | 05-04-2025 10:34 PM |