|
POST
|
Are you following the code in the SE thread because that is what you are doing, i.e., inserting records from one dataset into another, or are you using the code just for its general structure? If the former, it might be quicker to use either the Copy Features tool or Append tool.
... View more
04-07-2016
02:01 PM
|
0
|
0
|
4724
|
|
POST
|
For a bit more context, or at least to read an interesting discussion, you should check out a StackExchange thread started by Dan Patterson a couple years back: Antipodal distance (or polygon fetch or polygon diameter) for concave polygons. Unlike calculating the minimum distance or minimum straightline distance, calculating the maximum straightline distance from a point within a polygon to the polygon's boundary is more involved. Looking at a simple concave polygon and point example: Polygon diameter has a common definition in mathematics (Wolfram MathWorld Glossary😞 Polygon Diameter The diameter of a polygon is the largest distance between any pair of vertices. In other words, it is the length of the longest polygon diagonal (e.g., straight line segment joining two vertices). For the example above, the polygon diameter can be represented by either of two pairs of vertices: (POINT(0 0), POINT(400 200)) or (POINT(400 0), POINT(0 200). Note that the definition of polygon diameter doesn't speak to convexity or concavity. For concave polygons, it is not uncommon to have the polygon diameter cross over the polygon boundary. Fetch or fetch length has its origins in the earth sciences, i.e., geography, hydrology, meteorology, etc.... (National Weather Service Glossary😞 Fetch ... 2. In hydrologic terms, The effective distance which waves have traversed in open water, from their point of origin to the point where they break. The concept of fetch is fairly straightforward, but computing fetch length isn't as straightforward as polygon diameter. At its most basic, fetch length depends on the shape of the water body surface (polygon) and the direction of wind. In reality other factors like landscape topography and water body bathymetry play into where exactly a wave starts. Typically what is called fetch length is really a potential or idealized fetch length based only on the surface shape of a water body and a given wind direction. Furthermore, since fetch is wind dependent, there is no single fetch length for a water body. Some people use the term fetch length in a singular sense, but what they are typically referring to is the maximum value of all fetch lengths for a water body. In terms of mathematics or computational geometry, I am not sure what the equivalent term is for maximum potential fetch length of a water body. There aren't a lot of tools that compute fetch length. As Dan Patterson pointed out in an earlier comment, the GME geom.polygonfetch tool is commonly used by folks. As the tool's documentation states, it uses a brute force algorithm "evaluating the lines created by connecting all pairs of non-neighboring vertices and retaining the longest line that does not cross any interior or exterior boundaries of the polygons." It is important to note that geom.polygonfetch doesn't do densification before computing maximum fetch, or what it just calls polygon fetch. For the example above, geom.polygonfetch will return a line represented by the (POINT(0 0), POINT(400 0)) pair of vertices, but there is a longer maximum fetch represented by (POINT(0 133), POINT(400 0)). The problem is there isn't a vertex at POINT(0 133), so the tool doesn't know there is a longer straightline distance within the polygon that doesn't cross a boundary. All of that said, polygon diameter and maximum potential fetch length aren't what you are after here. Both are properties of a given polygon, not a spatial relationship between a polygon and another geometry. For points in polygons, a Hausdorff distance line will give the longest straightline from a point to the boundary of a polygon. The Hausdorff distance doesn't speak to convexity or concavity, so it is more similar to polygon diameter than maximum potential fetch length. Even if your polygons were convex or crossing polygon boundaries wasn't an issue, very few geospatial products have implemented Hausdorff algorithms. In short, you are going to be rolling your own solution. Googling for "maximum distance point in polygon" yields some links to good discussions. Most of what is discussed involves brute force approaches like the geom.polygonfetch tool. I am an engineer by training, and by mindset, so sometimes I ask myself what answer can I live with rather than what the perfect or correct answer is in theory. One approach you could try, knowing it may miss the true answer: Determine polygon diameter Create lines every x degrees originating from point and of length polygon diameter. Intersect lines on polygon Return maximum of first line segment from lines.
... View more
04-07-2016
11:12 AM
|
1
|
1
|
7922
|
|
POST
|
According to the documentation for Add Geometry Attributes: One or many attribute fields will be added to the input features depending on the options specified in the Geometry Properties parameter. If the fields already exist in the input features, the values in those fields will be overwritten. If you want to use Calculate Field instead, the examples in the documentation cover your situation. For example, !SHAPE.CENTROID.X! and !SHAPE.CENTROID.Y!
... View more
04-06-2016
06:57 AM
|
2
|
4
|
9301
|
|
POST
|
I am running ArcMap 10.4. When I run the tool from within ArcMap using your sample data, it hangs (runs indefinitely with no disk I/O or CPU). When I run the tool directly in the Python interpreter, it crashes. I suggest you open an Esri Support case.
... View more
04-04-2016
08:11 AM
|
0
|
0
|
795
|
|
POST
|
It helps to include specific error messages, rather than just saying you got an error message. You don't put all the code in your Expression dialog, just "Status"
... View more
03-31-2016
12:32 PM
|
1
|
1
|
1210
|
|
POST
|
What about the Pivot Tool, it is designed for "reducing redundancy in records and flattening one-to-many relationships." That said, it will not fill in all of the empty columns like you want because that data doesn't exist in your summary statistics. One way around that issue is to add additional 0 count records for all of the time ranges you are interested in.
... View more
03-31-2016
11:08 AM
|
0
|
3
|
5273
|
|
POST
|
Your expression needs to be a string representation of your expression. In Line 63 above, you are not trying to create an expression but divide two Field data types, which isn't supported. Also, be careful when building your expression that you use field names and not field objects. Try replacing Lines 60-64 with: fieldExpression = '!Shape_Area! / !ORAREA!'
arcpy.CalculateField_management(newInput, 'AREARATIO', fieldExpression, 'PYTHON_9.3')
... View more
03-31-2016
10:50 AM
|
2
|
1
|
3619
|
|
POST
|
Please mark Anthony's response Correct if it answered your question. That way, it lets others know the question has been answered.
... View more
03-31-2016
06:38 AM
|
0
|
0
|
1821
|
|
POST
|
Some of SQL Server's spatial operations are known to be sensitive to the number of vertices in the polygons involved in the operations, at least this was the case with SQL Server 2008, 2008R2, and 2012 (I haven't revisited the issue with 2014 or newer). There are numerous MSDN threads that discuss various aspects of this issue. Some that come to mind are: SQL 2K8R2: Any performance hints for bulk loading data from spatial/GIS db into a data warehouse? SQL Server Express Performance Limitations With OGC Methods on Geometry Instances slow spatial predicates (STContains, STIntersects, STWithin, ...) The titles might not sound relevant, but there is some good content in all three of those threads. Personally, I have used the tessellation method put forward by Jakub K. in the aforementioned threads, and it dramatically improved performance. If you can live with fuzzy results, i.e., a few false positives around the peripheries of your boundaries, it might be worth looking into Filter instead of STIntersects because Filter is a "fast, index-only intersection method." Of course, tuning spatial indexes can also sometimes improve performance instead of relying on the default spatial indexes that have been chosen for you when creating the feature classes.
... View more
03-30-2016
06:18 PM
|
0
|
0
|
3090
|
|
POST
|
Instead of closing all the way out of ArcMap and relaunching, what if you remove the feature class in question and add it back in? Does it show the updated data?
... View more
03-30-2016
05:49 PM
|
0
|
0
|
1584
|
|
POST
|
In a former job, I worked extensively with state and county data from across the country. As soon as I saw the labels in your image, I knew what the number represent. I am not sure why they are labeled/called "rows" and "columns" in your data, but the data are FIPS/ANSI codes for States and County and County Equivalents (See: American National Standards Institute (ANSI) Codes - Geography - U.S. Census Bureau). The ANSI code for Michigan is 26, and the other numbers you see are the ANSI codes for the individual counties or county equivalents. If you are working with data from other states, you don't have to figure out a scheme for numbering, just use the ANSI codes that already exist. If you are working with different irregular shaped data, then you would need to come up with some logic for ordering them like Dan points out.
... View more
03-30-2016
05:43 PM
|
1
|
1
|
3883
|
|
POST
|
A couple of questions: You mention labeling, which implies that attribution already exists and you are looking to display those attributes as labels on a map. I get the impression you are interested in attributing and not labeling, is that correct? For something less regular, like counties in a state, what do you envision the rows and columns being or looking like? Talking about columns and rows implies something table or grid like, which raises lots of questions when working with something irregular like counties distributed across a state. For example, would the rows and columns be regular sizes? If so, would the size be smaller than typical counties or larger than typical counties? If a county touches multiple columns and rows, how would you decide which one gets attributed to the county? For the irregular shapes you talk about, can you provide a rough illustration of what you see the result looking like?
... View more
03-30-2016
01:45 PM
|
1
|
4
|
3883
|
|
POST
|
What about closing out the pool after the results are returned: results = pool.map(worker_function, parameter_sets)
pool.close()
pool.join()
... View more
03-30-2016
09:44 AM
|
1
|
1
|
12287
|
|
POST
|
I am glad they finally updated the docs to acknowledge this limitation. With ArcGIS 10.2.x and prior, they actually stated, "this performs the same operation as File > SaveACopy in ArcMap," which hasn't been the case since ArcGIS 10.0. Now that they, or part of they, are acknowledging bloat, it would be nice if they addressed it within ArcMap.
... View more
03-30-2016
09:32 AM
|
0
|
0
|
1429
|
|
POST
|
I don't recall seeing this question last summer, but it was right around vacation time for me. Anyhow, did you ever get a resolution? Still having the problem? We deployed ArcGIS 10.3.1, not 10.3, in our organization and didn't seem to run into this issue.
... View more
03-30-2016
07:48 AM
|
0
|
0
|
1429
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-11-2026 07:04 AM | |
| 1 | 07-17-2026 06:54 AM | |
| 2 | 07-06-2026 12:29 PM | |
| 1 | 07-06-2026 12:00 PM | |
| 2 | 06-05-2026 10:30 AM |
| Online Status |
Offline
|
| Date Last Visited |
Wednesday
|