|
POST
|
Yes, it does have a false easting. But why would that matter? I get the same deviations no matter what coordinate pair I choose. I picked 0,0 for the example so it's easy to see the result. If I pick (1234,5687) and use an angle of 0, I expect the X value to stay constant. It doesn't. I've run the code above with a number of different projected coordinate system IDs and get similar results. When I change to a geographic coordinate system (eg 4326) there's definitely differences between the results with different options. >>> ptg = arcpy.PointGeometry(arcpy.Point(1234,5678), arcpy.SpatialReference(102300))
>>> ptg_1 = ptg.pointFromAngleAndDistance(0, 10000, "PLANAR")
>>> ptg_1.firstPoint
<Point (2187.77603462, 15639.1245447, #, #)> The data generated in the picture above is UTM Zone 15N.
... View more
03-25-2016
01:03 PM
|
0
|
7
|
5664
|
|
POST
|
Hi Jeff, I think it might be the url you're sending... you might be missing the "CreateReplica" portion on the end. If I make a request without the CreateReplica I get back the overall FeatureService description JSON which has keys that match the output you listed. So the value of crURL should be in the format: http://services1.arcgis.com/{id}/arcgis/rest/services/{name}/FeatureServer/CreateReplica Fred
... View more
03-25-2016
12:50 PM
|
1
|
2
|
3016
|
|
POST
|
Hi All, I won't say projections and transformation and all the math involved in coordinate systems are my strong point but something seems off when I use this method to create points at specified angles/distances - especially at the 0, 90, 180, 270 angles. It could just be my understanding of the math and potentially this method is not the correct tool for the job as they say. Here's my simple test and what I'm seeing: Create a point in a projected coordinate system (Montana State Plane: 102300) at the center (0,0). Use this method to create a new point with angle 0, distance 10,000 meters and the "PLANAR" option. My exception (which could be wildly wrong) would be to get the point (0,10000). Since my angle is 0, i'm not expecting the X value to change --- at least when using the PLANAR option. The result i get is (954.9342, 9961.7461) ... so over 10,000 meters I've deviated 1,000 meters in the X and came up 40 meters short in the Y. Does this seem correct for the "PLANAR" option? I was expecting pretty basic Cartesian math here... but maybe not? When I run the reverse method 'angleAndDistanceTo' using the two points, it DOES return 0 for angle and 10,000 for distance so it's at least being consistent in both directions. However when I try any of the other options GEODESIC,GREAT_ELLIPTIC, LOXODROME, and PRESERVE_SHAPE I get the same point coordinates. Which sort of makes me think something is off with the function .... Shouldn't there be some differences with these options? I get slightly different numbers if I choose a UTM zone rather than the MT SP system so the math appears to be using specifics of the coordinate system but again I wasn't expecting that for the "PLANAR" option. The help on the methods don't really shed much light on it either: PointGeometry—Help | ArcGIS for Desktop TEST CODE ptg = arcpy.PointGeometry(arcpy.Point(0,0), arcpy.SpatialReference(102300))
ptg.firstPoint
ptg_1 = ptg.pointFromAngleAndDistance(0, 10000, "PLANAR")
ptg_1.firstPoint
ptg.angleAndDistanceTo(ptg_1, "PLANAR")
ptg_1 = ptg.pointFromAngleAndDistance(0, 10000, "GEODESIC")
ptg_1.firstPoint
ptg_1 = ptg.pointFromAngleAndDistance(0, 10000, "GREAT_ELLIPTIC")
ptg_1.firstPoint
ptg_1 = ptg.pointFromAngleAndDistance(0, 10000, "LOXODROME")
ptg_1.firstPoint
ptg_1 = ptg.pointFromAngleAndDistance(0, 10000, "PRESERVE_SHAPE")
ptg_1.firstPoint RESULTS <Point (0.0, 0.0, #, #)> <Point (954.907914023, 9961.4713466, #, #)> (0.0, 10000.000000000931) <Point (954.907914023, 9961.4713466, #, #)> <Point (954.907914023, 9961.4713466, #, #)> <Point (954.907914023, 9961.4713466, #, #)> <Point (954.907914023, 9961.4713466, #, #)> The overall goal is to construct transects to a feature and even if the math is correct, the visual result is not what user expects which are exactly perpendicular lines thru the feature: It's likely the math is correct and my understanding of the function is off so I need to simply write my own "planar" functions for this but that's not really obvious from the help. Thanks for any enlightenment you like to share.
... View more
03-25-2016
12:38 PM
|
0
|
9
|
11586
|
|
POST
|
Hi Jeff: First what request are you making ie. what's the value of crUrl? Second, i do think that methodology is a little outdated.... Do any of the solutions in this blog post help? Quick Tips: Consuming Feature Services with Geoprocessing | ArcGIS Blog Do you really care about creating a "replica" which keeps everything in sync for reloading offline editing or do you just need a copy? The export item is the best way to download a copy: ArcGIS REST API
... View more
03-24-2016
10:18 AM
|
1
|
0
|
3016
|
|
POST
|
Adding a note: The list addition works fine for 2 polygons but if you add a third, it runs but the result is bunk... p3 = [<Point (340884.5, 4635231.5, #, #)>, <Point (340875.0534, 4635240.9783, #, #)>, <Point (340881.5, 4635249.5, #, #)>, <Point (340890.5, 4635246.5, #, #)>, <Point (340890.5, 4635237.5, #, #)>, <Point (340884.5, 4635231.5, #, #)>] mp = p1 + p2 + p3 Tools executes to completion but result has a "slices" thru the result rather than discrete chunks of cells. I've tried a bunch of different combinations and polygons... two always seems to work, three+ no good... oh well ExtractByMask i guess.
... View more
03-23-2016
12:35 PM
|
0
|
0
|
1737
|
|
POST
|
It should loop all the features in the point feature class. If you're in ArcMap and you have any features selected it will only execute on those selected features so make sure you unselect all features in the point layer before running the code.
... View more
03-23-2016
11:53 AM
|
0
|
0
|
981
|
|
POST
|
Hi, Couple questions: 1. what version of ArcGIS are you running? 2. how are you running the script? Inside ArcMap/Catlog python window, IDLE, standalone, etc 3. It looks like the syntax highlighter or copy paste didn't get the correct indents for lines 6-8. I tried to edit the original post so make sure you get a clean copy or adjust your version. 4. Is your line 5 the same as mine? for row1 in cursor1: .... if so then something is wrong with the cursor. are all the names spelled correctly?
... View more
03-23-2016
11:51 AM
|
0
|
1
|
981
|
|
POST
|
Winner, Winner, Chicken Dinner!!! Thanks Darren... that's seems wrong but it does work and gets me moving forward ...
... View more
03-23-2016
10:47 AM
|
0
|
1
|
1737
|
|
POST
|
True, ExtractByMask is the fallback, but in my production code we're not reading the points/polygons from feature class --- that was just the test code --- so creating the feature class is an expensive disk io or memory operation ... the ExtractByMask tools also causes the cells alignment to change if the raster analysis environment isn't correctly configured so it tends to lead to errors in the overall process. It would just be nice to either have the documentation correctly state what works or if the documentation is correct then there's a bug in the tool...
... View more
03-23-2016
10:30 AM
|
0
|
0
|
1737
|
|
POST
|
Hi, Here's a quick python snippet that will: loop the points feature class with an update cursor select the polygon it intersects get the first selected polygon check if the SiteAdress fields match when both are lowercased set the point Verifi field update the row Definitely a bunch of assumptions in this and no error handling but it should get you going... Arcpy doesn't let us do spatial searches yet so you have to fallback on the "selectbylocation" tool .... it's heavy handed but works. fc1 = "points"
fc2 = "Polygons"
lyr2 = arcpy.MakeFeatureLayer_management(fc2)
with arcpy.da.UpdateCursor(fc1, ["SHAPE@", "SiteAddress", "Verifi"]) as cursor1:
for row1 in cursor1:
print row1
arcpy.SelectLayerByLocation_management(lyr2, "INTERSECT", row1[0])
with arcpy.da.SearchCursor(lyr2, ["SiteAddress"]) as cursor2:
row2 = cursor2.next()
print row2
row1[2] = "Match" if row1[1].lower() == row2[0].lower() else "No"
print row1[2]
cursor1.updateRow(row1)
... View more
03-23-2016
10:20 AM
|
2
|
5
|
981
|
|
POST
|
Hi Dan: Thanks for the response... pretty sure I'm constructing the polygon correctly: 1. If I use the point list of a single polygon in the extract function, they each work fine... I've verified they are closed (last point = first point) and clockwise drawn. However if I add each point list to a new point list and use that in the extract method, it fails. My multi-polygon list looks very much like the one that's posted in the help: p1 = [<Point (340892.76867, 4635242.58032, #, #)>, <Point (340899.5, 4635249.5, #, #)>, <Point (340914.5, 4635237.5, #, #)>, <Point (340899.5, 4635228.5, #, #)>, <Point (340892.967108, 4635229.68185, #, #)>, <Point (340892.76867, 4635242.58032, #, #)>] works fine p2 = [<Point (340929.5, 4635231.5, #, #)>, <Point (340921.409873, 4635224.25788, #, #)>, <Point (340919.557786, 4635238.01624, #, #)>, <Point (340922.6005, 4635244.69699, #, #)>, <Point (340932.985417, 4635244.63084, #, #)>, <Point (340929.5, 4635231.5, #, #)>] works fine mp = [p1, p2] fails 2. As for using the arcpy.Polygon class, I'm retrieving the polygons directly from a feature class so I'm pretty sure they are "constructed correctly". Just to ensure the result of the search cursor in not a proper arcpy.Polygon class, I exported the points to a simple float list and rebuilt the arcpy.Polygon class as described in the help and it still fails.... as either a single or a multiple part. <Polygon object at 0x3734d4d0[0x3734d440]> fails
... View more
03-23-2016
09:30 AM
|
0
|
5
|
1737
|
|
POST
|
The help document for ExtractByPolygon (http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/extract-by-polygon.htm) states: "A polygon (or polygons) that defines the area of the input raster to be extracted. Each polygon part is a list of vertices defined by Point classes. Optionally a Polygon class can be used to define a list of polygon parts." However the tool fails if the parameter is an arcpy.Polygon class. Is a polygon class really supported? It would be much easier than extracting out the points for the polygon part into a new list... Also, the document seems to indicate that multiple polygons can be used at one time: See the first line of the parameter description and line below clearly shows a list of multiple lists "form of the object is: [[point(x1,y1), point(x2,y2), point(xn,yn), ..., point(x1,y1)], [point(x'1,y'1), point(x'2,y'2), point(x'n,y'n), ..., point(x'1,y'1)], ...]" The tools fails when the list contains multiple lists of points. Is the documentation wildly incorrect or the tool broken or am I using it correctly?
... View more
03-23-2016
09:12 AM
|
0
|
8
|
2990
|
|
POST
|
Hi All, Is there a out-of-the-box tool or correct workflow for retrieving and overwriting features from Parent version during the edit and qa process? Here's the scenario: I'm reviewing edits in a child version using the "version changes" command which shows me all the adds, deletes and updates in the version. There's many edits and only a small few are unacceptable so throwing away the whole version and starting over is not desired (and wasted effort). In some of these rejects (maybe a delete or where the edit was complex) it would be much better to simply start over with the original parent version of the feature. However, there doesn't appear to be a way to "get" that version of the feature. So far our work around on these is to create a conflict in the parent version or second edit session (i.e. a simple attribute change like "edit me" in a text column) and run reconcile in the child version which detects the conflict (hopefully and doesn't auto merge) and then select the parent feature from the conflict manager. This process seems overly complicated and prone to some errors (conflict detection doesn't proceed as expected, forgetting to remove the "edit me" note, etc). Between the "conflict manger" and the "version changes" commands it seems like all the code is there to pull the desired features back down from the parent version but it's just not wired up for this scenario? or am i missing something? Thanks
... View more
11-09-2015
11:58 AM
|
0
|
0
|
2444
|
|
IDEA
|
-->
When your ArcGIS Desktop licenses at a given level are all checked out, you get a "All ArcGIS for Desktop XXX licenses are in use!" message. You then have to go to ArcGIS Administrator, fidget with the interface to determine which other license levels are available, select one and then restart the desktop app. If you share various licenses at different levels you probably run into this issue at least occasionally if not often. Why can't the desktop application check if there are other avialable licenses in the same license manager available and prompt me to select one and move on? This would make the situation so much more fluid and much less curse word inducing. At the very least prompt me to "auto open" the administrator app so I don't have to dig thru the start menu for it.
... View more
02-16-2015
11:15 AM
|
6
|
2
|
756
|
|
POST
|
Tech support verified the bug with non-web mercator/wgs84 spatial references. Status at: BUG-000083043
... View more
11-05-2014
02:40 PM
|
0
|
0
|
1142
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-15-2024 10:18 AM | |
| 1 | 06-05-2025 08:06 AM | |
| 1 | 04-03-2024 08:47 AM | |
| 1 | 06-12-2018 03:16 PM | |
| 1 | 09-14-2023 01:54 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-01-2025
12:52 PM
|