|
POST
|
Is the database table the foreign table? If so you may be able to wrap it in a registered view that creates a unique ID field for you. With SQL Server the query is something like: SELECT
CAST(ROW_NUMBER() OVER (ORDER BY allRecords.[SortField]) AS int) AS [OBJECTID],
allRecords.*
FROM
[database].[user].[table] allRecords
... View more
07-07-2022
04:40 PM
|
0
|
2
|
6594
|
|
POST
|
One thing you can try is checking if the code block is causing issues. You can replace the block with this 1-line expression: "{} {}".format(!QSTRM!, !LLD!) if !LLD! is not None else !QSTRM!
... View more
07-07-2022
04:25 PM
|
1
|
1
|
2556
|
|
POST
|
It's a bit hard to diagnose this from where I'm sitting, your code looks solid overall. One thing you can do is modify the loop to print out the generated SQL clauses and see what happens if you try to set a definition query with them, then select them by location etc. etc. That way you can see where the process breaks down interactively. If everything works just fine this way then I'm not sure what the next step would be. Maybe try replacing arcpy.conversion.FeatureClassToFeatureClass with arcpy.analysis.Select?
... View more
07-07-2022
04:05 PM
|
0
|
0
|
918
|
|
IDEA
|
I'll add a "everything on screen" option to that suggestion as well, I'm sure a lot of users would be more comfortable setting the extents using the map controls instead of a vertex tool
... View more
07-07-2022
03:18 PM
|
0
|
0
|
4110
|
|
POST
|
Are you converting a text field to a long integer field? The maximum value of a long field is (2^31)-1, or 2,147,483,647, which is 9 consistent decimal digits, or 10 in some cases. To store numeric versions of larger numbers, use a "double" field, that gives you 15 consistent decimal digits with no precision loss. Here's a quick field calculator example (the long field is null because the value causes the calculation to fail due to size restrictions):
... View more
07-07-2022
02:54 PM
|
0
|
0
|
2031
|
|
POST
|
I think this is what you're looking for: ArcGIS API for Javascript - Reverse Geocode.
... View more
07-07-2022
11:07 AM
|
2
|
0
|
1703
|
|
POST
|
The good news is you've encapsulated the "add a vertex at a given distance to an existing line" code to a nice, easy to use function. You can use that in another function, maybe something like this: def densify(shp, vertex_count):
# Add 1 so the final vertex isn't coincident with the line end
stride = shp.length / (vertex_count + 1)
dist = 0.0
for _ in range(vertex_count):
dist += stride
shp = insertV(dist, shp)
return shp As an aside, I misread your function as an attempt to clip off the first portion of a line, so here's some code that does that at a bonus: def shortenLineReverse(dist, shp):
newP = shp.positionAlongLine(dist).firstPoint
arr = arcpy.Array()
arr.add(newP)
part = shp.getPart(0)
for i in range(len(part)):
p = part.getObject(i)
l = shp.measureOnLine(p)
if l > dist:
arr.add(p)
return arcpy.Polyline(arr, shp.spatialReference)
... View more
06-27-2022
10:30 AM
|
0
|
0
|
3720
|
|
POST
|
You're on the right track, all arcpy Geometry objects have a JSON property, so your line #10 should be: geom_loads = json.loads(geom.JSON) For simpler jobs you can skip JSON fiddling and use some of the properties and methods on the Geometry objects themselves, such as getPart and spatialReference. For example, here's a line of code that creates a new Polyline object from the last 2 points of another Polyline: new_geom = arcpy.Polyline(geom.getPart(-1)[0][-2:], geom.spatialReference) I highly recommend you keep the official docs on hand, there's a surprising amount of built-in methods on these objects so you can build up your own little GIS factory. Here's some key links: Geometry (this is the base class for all the other Geometry types). PointGeometry Polyline Polygon Point (this is the simple 2D/3D/4D point object that all of the other Geometries are built out of. If you want the object that you deal with from a point feature class' shape field, you want "PointGeometry"). Array (this is like a Python list but is different somehow, Polyline and Polygon objects use this class to hold the Point objects they're built from. You can use standard Python index and slice syntax to extract data).
... View more
06-24-2022
10:16 AM
|
1
|
3
|
3744
|
|
POST
|
For manual vertex fiddling a good method is to extract the geometry object for each feature like with arcpy.da.UpdateCursor(my_features, "SHAPE@") as update:
for row in update:
geom = row[0] and then dump the geometry data to JSON by combining the loads function from the standard Python json library with the geometry object's JSON property. Once you're done manipulating the dictionary you get back you can use something like new_geom = arcpy.AsShape(json_data) and throw that into your update cursor. You'll probably need a few helper functions to deal with subsets of the JSON structure so you can deserialize individual points/segments as geometry objects without losing your spatial reference info. As for your specific case, if you just need to add vertices to the lines, you can find the final two vertices in the line, construct a temporary line object from that, then call the line's positionAlongLine method with use_percentage=True to dump out new vertices that won't distort your original feature. No guarantee this'll work for complex segments but it's a starting point. Have fun!
... View more
06-23-2022
04:28 PM
|
0
|
1
|
3759
|
|
IDEA
|
This is a great idea, a "retain last entry" checkbox when you configure a field in the Field Maps app* would help with a lot of focused workflows. *the online/portal Field Maps configuration app needs a mild rebrand to avoid confusion but that's a tale for another time
... View more
06-17-2022
03:48 PM
|
0
|
0
|
2550
|
|
IDEA
|
Conda supports this already, open the "Python Command Prompt" from your start menu and use this command: conda install "\path\to\my\downloaded\package.tar.bz2" I guess an "install package from path" button would be a nice feature for Pro to supplement this.
... View more
06-17-2022
08:34 AM
|
0
|
0
|
3045
|
|
IDEA
|
The Rematch Addresses pane has a variety of options and state (layer to rematch, fields for current match, fields for potential matches, locator, current feature out of available selection) that are not saved to the project file. In the event that a user has to close and then re-open the project the rematch pane has to be opened for the layer and all of these settings must be reconfigured. Serializing this information into the project file would save time for rematch workflows and could potentially lead to some sort of reusable configuration file in a later release.
... View more
06-09-2022
03:14 PM
|
0
|
0
|
848
|
|
IDEA
|
Our team has received requests from multiple clients for this functionality, would love to see it in an upcoming release.
... View more
05-25-2022
11:26 AM
|
0
|
0
|
3442
|
|
IDEA
|
Our team was able to work around this after switching from standalone servers to Enterprise but our client has now tripled the amount of requests they make as they can't cache tokens between multiple requests. I think a reasonable compromise would be to keep the 2 week limit for Portal tokens, but allow the server tokens used for direct service access to have longer expiration times. This maintains some backwards compatibility with older server setups while keeping the current level of security intact for the newer Portal workflows.
... View more
05-25-2022
11:21 AM
|
0
|
0
|
1739
|
|
IDEA
|
Add a parameter type for script tools that behaves identically to the "String" parameter, but the control is a text box that supports tabs, line breaks etc. The formatting within the text box would be carried over to the parameter value. A filter on the parameter to let the user choose syntax highlighting options (Python, text, HTML etc.) and line number display would be nice but not required. This idea came from a recent project where I wanted the user to enter arbitrary Python code into a parameter. I currently have to hack together a solution with a multivalue String parameter and convert the values into a single item. This leads to a poor UX and many formatting limitations. A Text Box input type would be a perfect fix for this as well as other script tool workflows that require large volumes of structured text from the user (large text field entries, injecting HTML formatting into fields, feeding custom query expressions into third-party web services etc.).
... View more
05-20-2022
04:44 PM
|
7
|
3
|
2630
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-24-2023 11:47 AM | |
| 2 | 04-09-2026 11:36 AM | |
| 1 | 09-08-2023 10:07 AM | |
| 3 | 03-26-2026 08:11 AM | |
| 2 | 03-12-2026 01:41 PM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|