|
POST
|
Not sure if this will help or not, but here is an example of drawing an ellipse given axis values (maxWidth & maxHeight). It uses paperjs but the math should be the same regardless. The main meat of the code is: if (counter<885) { t = (Math.sin(counter * (180/Math.PI)/10800) * Math.PI) + Math.PI; x = (maxWidth/2) + a * Math.cos(t); y = (maxHeight/2) + b * Math.sin(t); path.add(new Point(x,y)); counter++; } edit: I essentially stole the idea from this Wikipedia page, which includes it and other methods. edit 2: I see you need to rotate the ellipse by a bearing. My example will not do that.
... View more
01-13-2016
11:20 AM
|
1
|
8
|
5716
|
|
POST
|
Glad you got it to work. You can also do it looking backwards (probably can use some refinement): >>> my_array = [6,7,8,9,10,11,12,27,28,29,30]
... one_back = 0
... out_array = []
... for current in my_array:
... if current <> one_back + 1:
... out_array.append(one_back)
... out_array.append(current)
... one_back = current
... out_array.remove(0)
... out_array.append(one_back)
... print out_array
...
[6, 12, 27, 30]
... View more
01-12-2016
03:35 PM
|
2
|
1
|
3378
|
|
POST
|
I suppose this is more about making the point that backwards compatibility isn't documented, but a workaround would be to export your model as Python script, and create a new Python script tool in the earlier version, rather than a model. It should work the same, provided the Python functionality existed in the previous version.
... View more
01-12-2016
02:42 PM
|
0
|
0
|
3528
|
|
POST
|
Sort of getting off topic here, but doing 4 things every time you need to do 1 thing will drive a person insane if they have to do it 1000 times in a field shift. However, I'm sure your clever students will grin and bear it for their lab.
... View more
01-11-2016
03:03 PM
|
0
|
3
|
1436
|
|
POST
|
Thanks for the script ideas. Here's a start to such a tool. Surprising how many steps are involved. >>> zones = []
... inTable = "my_Excel_spreadsheet"
... outFC = r'in_memory\out_merge'
... UTM_field = "UTM_ZONE"
... with arcpy.da.SearchCursor(inTable, UTM_field) as cursor:
... for row in cursor:
... if row[0] and row[0] not in zones:
... zones.append(int(row[0]))
... lyrs = []
... for zone in zones:
... sr = arcpy.SpatialReference(26900 + zone)
... evt_lyr = 'evt_z' + str(zone)
... arcpy.MakeXYEventLayer_management(inTable, "Easting", "Northing", evt_lyr, sr)
... temp_lyr = 'temp_z' + str(zone)
... temp_fc = r'in_memory\\' + temp_lyr
... arcpy.CopyFeatures_management(evt_lyr, temp_fc)
... whereclause = arcpy.AddFieldDelimiters(temp_fc, UTM_field) + ' <> ' + str(zone)
... arcpy.SelectLayerByAttribute_management(temp_lyr, "NEW_SELECTION", whereclause)
... arcpy.DeleteFeatures_management(temp_lyr)
... lyrs.append(temp_fc)
... arcpy.Merge_management(lyrs, outFC)
... View more
01-11-2016
02:34 PM
|
1
|
1
|
2229
|
|
POST
|
Agreed. Honestly, I'm pretty happy if I get a file with two UTM zones. It's not the end of the world to pull them apart, just cumbersome. It's also much easier than trying to train how to use new software, understand projections, etc.
... View more
01-11-2016
01:47 PM
|
1
|
0
|
1436
|
|
POST
|
Yes, we (I) do use DNRGPS, however, the main issue is that the data coming in is often in the form of paper datasheets (later entered into Excel), with much more information than just the location. UTM Zone, Easting, and Northing are just three fields among many. The field workers use their GPS for many tasks besides collecting point coordinates, like estimating distances between and to coordinates, navigation, etc., for which they need coordinates in metres, not degrees.
... View more
01-11-2016
01:32 PM
|
0
|
2
|
1436
|
|
POST
|
Just out of curiosity, here is the sequence of buttons I would need to press to change from UTM to DD on a Garmin GPSmap 62s and return back to the map: Menu-Menu-Setup-Down-Down-Down-Position Format-Position Format-Down-Down-Down-Decimal Degrees-Quit-Quit-Quit-Quit-Quit-Quit That's 18 button presses. Record the coordinates to the datasheet. Now I need to get back to UTM because I need to know something in metres. That's another 18 presses. At this point, I would throw the unit into the nearest stream.
... View more
01-11-2016
01:13 PM
|
1
|
0
|
2229
|
|
POST
|
Thanks, Melita. The tables are often provided in Excel format already, so your workflow would work, although it still has the same problem of duplicating effort (copy/paste twice, import twice), plus having to work outside ArcGIS, plus the potential for me to mess up the entire dataset using Excel sort. Really, I'm just looking for a less cumbersome way to split a single dataset into two CRS and merge back together, but I'm beginning to see that this may just be a necessarily cumbersome task. Thanks all for the ideas and discussion.
... View more
01-11-2016
01:02 PM
|
0
|
7
|
2229
|
|
POST
|
I suppose DD are useful for GIS users, but not so for the person on the ground. It's pretty handy to be able to get real info from projected coordinates, in metres. What model GPS unit do you use? By far, the most common unit I encounter are Garmin GPSmap-style units, which do not simply flip back and forth between CRS, without going into the unit's main settings.
... View more
01-11-2016
12:20 PM
|
1
|
2
|
2229
|
|
POST
|
That would be device-specific. The units/CRS are set fairly deep within the GPS main settings.
... View more
01-11-2016
12:11 PM
|
0
|
1
|
4615
|
|
POST
|
This isn't to do with error. As you cross a UTM zone boundary, the GPS chooses which zone it's in and reports/records those coordinates. The resulting table or data sheets then contain those coordinates.
... View more
01-11-2016
12:07 PM
|
0
|
4
|
4615
|
|
POST
|
As I replied to Dan, I'm somewhat stuck in a machine bigger than myself with this. UTMs are the only option. I can't expect field workers to remember that just because the data might make its way to me at some point, they need to record a different type of coordinates. More just looking for a few less clicks between multi-CRS table and single feature class. Unfortunately, as these tables come to me in so many different formats, I don't think I could ever write a script that covers all cases.
... View more
01-11-2016
12:05 PM
|
0
|
0
|
4615
|
|
POST
|
We are somewhat stuck using UTM in the field. It's the industry standard (really, the only option ever used), for better or worse. It's easy for field workers to estimate distances using the coordinates, and vice versa. As a GPS can only use a single CRS at a time, they are set to UTM.
... View more
01-11-2016
12:00 PM
|
0
|
0
|
4615
|
|
POST
|
What are the names of the towns that cause it to fail? In particular, are there any special characters, like an apostrophe? Or, is it a different town each time?
... View more
01-11-2016
11:38 AM
|
0
|
1
|
2988
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-25-2015 01:51 PM | |
| 1 | 08-30-2013 02:22 PM | |
| 1 | 04-12-2011 11:19 AM | |
| 1 | 09-17-2021 09:43 AM | |
| 1 | 04-04-2012 12:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
07-15-2023
12:11 AM
|