|
POST
|
I used the "UPLOAD SCRIPTS" at the top of ArcGIS Code Sharing and it set up this in my ArcGIS.com account: Create Shovel Test Grid. However, nothing shows up anywhere that I can see at codesharing. Filtering on Github (by clicking "Github repository" under Result Type) gives Sorry. No results found.
... View more
08-27-2017
10:25 AM
|
0
|
4
|
1803
|
|
POST
|
I will try to write up something on github for GIS people soon.
... View more
08-14-2017
02:41 PM
|
0
|
1
|
1311
|
|
POST
|
If you search this forum for "schema lock" you will find hundreds of messages. In my experiences, as with many things in ArcMap and ArcCatalog, quitting and restarting is the most reliable (and time consuming) way to deal with schema locks. There does not seem to be any consistent pattern to it that I have ever seen. I find that if I try to keep ArcMap open and to run the tools in ArcCatalog it's worst - I have to close ArcMap to clear the lock before I can work in ArcCatalog. If the feature class or sometimes just the geodatabase is open in ArcMap it can get locked. I would think that it would only create locks when I start editing but that's not always true. I have the best luck when working exclusively in ArcMap but even that's often problematic.
... View more
08-14-2017
02:40 PM
|
0
|
0
|
1311
|
|
POST
|
Oh! Look! an example in still written BASIC! and yes -- density is the issue so though interesting that page is not helpful. In this project I created a separate feature class for the major contour intervals using modulo.
... View more
08-14-2017
02:27 PM
|
0
|
0
|
2044
|
|
POST
|
Thanks for the suggestion but the problem is labels are not appearing when converted to annotation. In the example they show contours on a white background which would work but I typically put my contour onto an aerial photo. I think halos look bad when rendered over a photo. Creating a polygon mask and then using the mask to erase from the contour is best (in Arcmap anyway). But I know how to do all that. It's the missing labels that's the problem. It's probably karma, I probably did something in a previous life in a galaxy far far away and now contour labels are the means of retribution.
... View more
08-14-2017
02:20 PM
|
0
|
0
|
2044
|
|
POST
|
This is the "before" picture showing the great job Maplex does. When I click "Convert" then it will create a new annotation file that contains just a few labels. I can't figure out why it does not convert ALL the labels. In Maplex labeling I can control the density of the labels in a reasonable way - I can intentionally make too many in Maplex and then after converting to Annotation I would by choice thin them out, removing the ones that are in the wrong place, shifting around the others etc. But that is not working since they mostly vanish when I run "Convert to annotation". I would have sent a second screen shot showing this but it would have just shown the above picture without the labels.
... View more
08-14-2017
02:13 PM
|
0
|
0
|
2044
|
|
POST
|
This sounds like you are saying "use ArcMap+Maplex not the Contour Annotation tool". I know all about label density and maplex labels; thanks for the reference all the same; that's what I have been doing until now. I want masks though -- I don't want lines running through the labels. Outside of using the unloved broken tool, my understanding is that if want to mask the labels I must convert them to annotation. When I do that it drops 99% of the labels. So it is useless so far as well. The lines through the numbers still beat ink on mylar. I have messed around with all the options including putting labels into an annotation group in the map. Feature linked, in a database, convert unplaced... tried even "Selected features" after selecting all contours. Nothing. Labels work, conversion to annotation fails. It comes down to either "it's broken" or "I am missing something". I've know I've done labels to annotation in the past with good results so I am just missing something. Usually I use it to fix up street names.
... View more
08-13-2017
01:57 PM
|
0
|
4
|
2044
|
|
POST
|
Is there any way to tell the contour annotation tool to generate more / denser labels? The "ladder" option seems to do nothing discernible. When I use the tool to create contour annotation, the labels are very sparse. I'd rather have it generate 10x too many and delete the extras than have a page of contours with 1 or 2 labels.
... View more
08-11-2017
08:09 PM
|
1
|
11
|
3294
|
|
IDEA
|
When I run any geoprocessing tool using arcpy feedback should be better than this: $ python create_anno.py That is to say -- no feedback of any kind at all for hours -- did it crash? Is it stuck in a loop? Is it working? Is it 90% done and I should keep waiting?? The same thing is true for running in a model or directly from the dialog or in a python script -- I need to know what is going on. A spinning blue circle and a pulsating bar do not count. Hooks would be great too, for example arcpy.ContourAnnotation_cartography(contour_1, contour_gdb__2_, "Contour", "240", annotation_1ft_240, "BLACK", "type", "UPHILL", "ENABLE_LADDERING", callback=status_callback) def status_callback(msg): print("ContourAnnotations says ",msg) As you can guess from this code, my problem today was in contour annotation, but it is the same in many other tools. Any operation that takes longer than a few seconds should give lots of feedback.
... View more
08-11-2017
08:01 PM
|
3
|
0
|
475
|
|
BLOG
|
Matrix methods are very efficient because you can roll all the operations into one step: translate, rotate, scale. If you are doing millions of transforms it will help. If you are only doing a few thousand and it's easier for you to understand, you can just code up the transform one step at a time. I did that to generate a small grid but now that I know about numpy I have to look at it again. I wrote a function like this to do the transform: def affine(p, scale, theta, offset): """ Scale, rotate and translate point """ return arcpy.Point( (p.X * math.cos(theta) - p.Y * math.sin(theta)) * scale.X + offset.X, (p.X * math.sin(theta) + p.Y * math.cos(theta)) * scale.Y + offset.Y) (from GitHub - Geo-CEG/shoveltest: Create grids to facilitate shovel tests for archaeology site work.) p is an arcpy.Point to be transformed, scale is a point defining how much to scale the point, theta is the rotation angle in radians, and offset says how far to move the point. In practice, I use a "for" loop to march through the points in a feature and call this function each time to move a point from one place to another.I do the same calculations (sine and cosine) each time but I am only moving about 100 points so I don't care, it takes longer for the "arcpy" module to load than to run my program. Dan's code relies on numpy to do the looping-- in the "rotate" function above, he builds a transformation matrix and then hands an array of points and the matrix to the "dot" method, and all the work takes place there. The numpy library is written in 'c' so it is probably more than 1000 times faster than what I did. Getting the work done is often more important than finding the most efficient code. In Dan's example he only rotates a point with the matrix. He could have added code to build a matrix that would also scale and translate the points at the same time. Hmm I guess that will have to go into my rewrite...
... View more
08-10-2017
10:11 AM
|
0
|
0
|
1479
|
|
POST
|
I set up a repository on github. I built a python toolbox too and I ran it successfully in ArcGIS Desktop 10.5.1 GitHub - Geo-CEG/shoveltest: Create grids to facilitate shovel tests for archaeology site work. If you don't know how to use Github, please ask, I have been thinking of writing a blog post on it. Please try this tool, I want it to work for you. I am sure there is plenty of tuning I could do on it but I'd like to hear if it is useful first. Next step in the workflow would be to convert the point grid into a GPX file; we should be able to do that in a model though. In this screenshot I was able to edit the baseline then run the tool right in ArcMap to generate a new grid. Note there are a couple wandering isolated points in this picture -- if a complete square does not fit it will get dropped but the points that still fit inside the polygon were not dropped.
... View more
08-09-2017
06:18 PM
|
1
|
11
|
1803
|
|
POST
|
Numpy is elegant, I suppose I will have to start over now. 🙂 Thanks for the link.
... View more
08-09-2017
04:59 PM
|
0
|
0
|
1803
|
|
POST
|
I now have my "shovel test" tool generating a grid of polygons and points, it measures the extent of the template polygon to figure out the grid size and then clips points generated to be to the right and above the origin and inside the template. Each point feature contains a "label" field that has the grid numbers as shown. If you wanted tiles to start lower down you'd need to drag the baseline south and run the tool again. Those are 50' tiles. I can publish the code if you want it. I did this as an exercise. Drop me a line or reply here.
... View more
08-09-2017
12:38 PM
|
3
|
17
|
3929
|
|
POST
|
Further thoughts Would this work as a suggested work flow? Working in a map with local coordinate system in FEET, 1 Create a line to define the origin (1,1) and direction of the Y-axis. 2 Select a template polygon feature class to define extent. 3 Run tool to generate grid. 4 If you need to tweak the grid, do that now using ArcGIS edit tools. 5 Run tool to convert grid to points; the tool will also label points (X,Y) starting at (1,1) by default. 6 If you need to tweak any POINTS you can do that now; move, add or delete points and edit the labels in attribute data. The labels will be exported to the GPX file so you can see them on the GPS screen. 7 Use tool to reproject to WGS84 and export to GPX file for field use. (When I say "tool" here I mean some operation that might be a piece of python or a model or a generic ESRI tool for the purposes of discussion assume it exists.) In step 1 I assume you draw a line starting at point (1,1) and going up in the direction of "Y" and that direction is not "North" Then the tool in step 3 works "up" and to the right generating 50' squares until it hits the edge of the template. It will generate complete squares only, corners OUTSIDE the template will not generate points. My assumptions so far: The template polygon feature class will have just one polygon in it Each intersection is the location of shovel test. Using centroids is a great way to use Fishnet but will create confusion when visualizing the fishnet grid. The grid-to-point tool (step 5) will deal with corners. Your GPS unit can accept a GPX file. Does it?
... View more
08-08-2017
06:04 PM
|
0
|
0
|
3929
|
| Title | Kudos | Posted |
|---|---|---|
| 6 | 08-09-2022 09:12 AM | |
| 2 | 03-26-2021 12:33 PM | |
| 2 | 03-17-2021 04:05 PM | |
| 3 | 03-11-2021 01:50 PM | |
| 1 | 08-09-2017 06:18 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-13-2024
04:16 PM
|