Select to view content in your preferred language

Create Quarter sections lines

10223
40
Jump to solution
05-11-2017 09:55 AM
CCWeedcontrol
Frequent Contributor

I have polylines of the sections and monuments. I need to create quarter sections lines. I am not sure what is the best way to achieve this without connecting the lines manual. I am sure some one has come across this before. So if anyone can help me out that would be awesome. Pic 1 show what i have and pic.2 is what i am trying to achieve.

0 Kudos
40 Replies
CCWeedcontrol
Frequent Contributor

I could also make the section line boundary ( i have those already, which is why i am needing the quarter lines) but if i can come up with a process to connect all points, sections points and quarter points that would work fine.

There is some attribute data see the pic i attached.

I did try the 'Points to line' with no luck well i did get a lot of lines but not what i was looking for. ha ha.

All lines only run north-south and eas-west.

0 Kudos
ChrisRingo
Regular Contributor

You could write some code to go through the section centers (attributed as "CNT"?) one at a time. You should be able to pick out the the four closest quarter section corners ("QRT" in the attribute table?) using a selection distance of a bit more than half the average quarter section width of 1320 ft. Then you can use the coordinates in the attribute table to connect the center point with each of the four quarter-section corner points and you'd have your four remaining quarter section lines. I assume the relevant points are attributed as in the picture below?

Section and quarter-section corners

CCWeedcontrol
Frequent Contributor

I was hopping there was a tool that would do that since my python is not very good when it comes to something like this. I was hopping maybe someone had already done or figured out how to do something like this but i can't image i am the only one that has faced this issue, but may i am. Any help on how to accomplish this would be awesome.

Thanks.

0 Kudos
ChrisRingo
Regular Contributor

I've attached a tool that you can use to create the interior quarter-section lines as I described in my post. In the zip there's a toolbox/script together a sample sections layer, a sample point layer, and mxd.  It's a fairly simple script without much error-checking, but the workflow would be the following:

1) Run the script using your point layer as input; it will produce a text file of the interior quarter-section line segments as output. There's a distance parameter that I've defaulted to 1000 that you may need to adjust - the distance units are the same as your input point FC.  It should be a bit larger than a typical side of a quarter-section (2640 feet, so I set the default to 1000 because the projection of my input point file had meters as the distance unit). The point of the parameter is that it needs to be big enough to select only the four quarter-section points closest to the section center, and no more. If you have sections that are really wonky, it may not work very well..

2) To convert the coordinates in the output text file to a FC, use the "XY to Line" tool (Data management/Features) - make sure to set the projection to that of your input point FC.  The x- and y- coordinate fields to use should be obvious...

3) Merge these lines into your section lines (which you said you already had), and you'll have your quarter-sections.

Let me know if you need any clarification!

Chris

0 Kudos
CCWeedcontrol
Frequent Contributor

I tried the tool box with the data attached, i set up the script parameters and ran the script (see attached) but there is not data in the cvs file. I am not sure what i am doing wrong. 

0 Kudos
ChrisRingo
Regular Contributor

You'll need to make the distance parameter a bit larger than half the typical side of a quarter-section, which is 2640 ft. Try 3000 ft instead, and it should work fine.

The script goes through all section centers (the points labeled 'CNT') and connects the center to each of the quarter-section points (labeled 'QRT'). If the script doesn't find exactly 4 points, it will print a warning, as you saw (in each case it found 0 points because your search distance was too small). When you run it on your full layer, you can use those messages to fine-tune the distance. As I indicated before, the script may not work well if your sections are too far from square. In those cases you would need to connect the points by hand if you use this tool.

Also, I edited the script to create quarter and quarter-quarter section lines - the one I posted only created quarter-section lines. I've attached the updated one.

0 Kudos
CCWeedcontrol
Frequent Contributor

Not sure what i am doing wrong. I am getting an error of error 000840: The value is not a data element. I attached a picture.

I attached a small amount of the point data and the scrip i am working with.

0 Kudos
ChrisRingo
Regular Contributor

Sorry about that, it was a coding error, updated code attached.  I tested with your point layer and it seems to work fine.

CCWeedcontrol
Frequent Contributor

I tried the new script an i got the following error.

I checked the output file to see if was created and it was and looks weird and i noticed that it's just connecting the section boundary lines.

Attached it a picture.

Adding missing QQ section corners on section lines...
Creating quarter-section lines...
For section-id = 79, 0 quarter corners were selected.
For section-id = 144, 3 quarter corners were selected.
For section-id = 145, 3 quarter corners were selected.
For section-id = 146, 3 quarter corners were selected.
For section-id = 195, 3 quarter corners were selected.
For section-id = 200, 3 quarter corners were selected.
Creating quarter-quarter-section lines...
Failed script CreateQQSectionLines...

Traceback (most recent call last):
  File "C:\GIS\Python Scripts\CreateQQSectionLines\CreateQQSectionLines.py", line 210, in <module>
    main()
  File "C:\GIS\Python Scripts\CreateQQSectionLines\CreateQQSectionLines.py", line 166, in main
    selDistQQ = int(in_selDist) / 2.0
ValueError: invalid literal for int() with base 10: '3000 Feet'

Failed to execute (CreateQQSectionLines).
Failed at Tue May 16 12:46:19 2017 (Elapsed Time: 1 minutes 27 seconds)
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
ChrisRingo
Regular Contributor

The selection distance should not have the units - it should be numeric.  When you set the parameters in your script tool, make the Distance data type "Double", not "Linear unit". That should do the trick.

0 Kudos