Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I would like to create a point shapefile that will contain sampling points along, and perpendicular to either side of a track route that I have as a line feature in ArcGIS 10.1. The points on the track will be every 50m along the line with the perpendicular points 10m either side of that.

Is there a tool or script that I can use to generate my points to save me placing over 300 points manually? Any help would be great.

*Edit 17:25 07.04.2013*

Thank your for the help so far but I am not sure that those methods would achieve what I am trying to.

Attached is a image prepared in powerpoint of what I am trying to achieve.

enter image description here

As you can see I would like to place points every 50m along the route of an existing track that is present in real life and has been digitised in to ArcGIS. The points perpendicular to the track points are 10m either side of the point.

I did manage to get a rough plan of the locations by using a bit of a long winded route and a free add in tool called ETGeo Wizard. This method involved the following steps: 1. Generate a 10m buffer around the track route polyline; 2. Convert the buffer polygon to a polyline; 3. Split the rounded ends off the polyline (i.e the original rounded edges of the buffer) leaving two lines 10m from the track route polyline; 4. Use ETGeo Wizard to place points every 50m along the polyline;

This method does give me the points but there is a lot of error meaning a lot of manual editing. It is also quiet a time consuming method of generating my points given that I have lots of track sections to place points on. I would therefore like to find a way to generate the points automatically using a tool or script.

I hope this helps to explain what I am trying to achieve a little clearer?

Thanks for any help

share|improve this question
    
I have done exactly this in VB.NET (using ArcObjects) - would this be an acceptable solution for you or are you looking to do this manually/with python? –  Nick Ochoski Apr 22 '13 at 18:15
    
Any luck on resolving this issue? I am looking to do the same thing... –  Afidus Oct 18 '13 at 19:41
    
This looks like a linear referencing (dynamic segmentation) problem to me. –  PolyGeo Jan 6 at 7:08
add comment

3 Answers 3

you can follow these steps:

If I haven't really understood your question, can you provide a simple drawing to explain the problem clearly.

share|improve this answer
    
you can also use the proportion tool which is under editor and then cogo, it allows you to select a distance say 50m along the line and the first button on the right allows you to copy that distance x amount of times –  Banger Apr 7 '13 at 2:49
    
    
10.1 link - just in case resources.arcgis.com/en/help/main/10.1/index.html#//… –  Banger Apr 7 '13 at 2:54
add comment

First off, create parallel lines to your original using this method: How to create an offset polyline in arcpy?

Next, run a cursor over each line and add points to them using the 'positionAlongLine' geometry method (only in ArcGIS 10.1). I made a function that writes these points to a new feature class and then splits the line based on the points, but you'd just be interested in the points.

def segmentLineAtInterval(inLine, outName, interval, lineClusTol, pts = False):
    sr = arcpy.Describe(inLine).spatialReference
    inLineName = arcpy.Describe(inLine).name
    segPts = arcpy.CreateFeatureclass_management(env.workspace, inLineName + '_pts', 'POINT','','','',sr)
    icursor = arcpy.da.InsertCursor(segPts, ('SHAPE@'))
    with arcpy.da.SearchCursor(inLine, ("SHAPE@LENGTH", "SHAPE@")) as cursor:
        for row in cursor:
            length = row[0]
            noIntervals = int(math.floor(length / interval))
            lastSegLength = length - interval * noIntervals
            for x in range(1, noIntervals):
                newPt = row[1].positionAlongLine(interval * x)
                icursor.insertRow((newPt,))
            if lastSegLength < lineClusTol:
                lastPt = row[1].positionAlongLine(interval * noIntervals + lastSegLength)
            else:
                lastPt = row[1].positionAlongLine(interval * noIntervals)
            icursor.insertRow((lastPt,))
    splitLine = arcpy.SplitLineAtPoint_management(inLine, segPts, outName, 1)

    if pts:
        return splitLine, segPts
    else:
        arcpy.Delete_management(segPts)
        return splitLine

An example call within a gdb would be:

segmentLineAtInterval('lines', 'lines_segmented', 5, 25, pts = True)

Your output would be 'lines_segmented' and 'lines_pts'. Sorry for the messiness of the script -- I pulled it directly from my tool. One caution -- although this usually works, I am now having trouble with the segment function, which appears to be a bug that does not recognize overlap between the constructed points and the line. But see how it works for you. I plan on investigating this, and will post if I figure out the issue.

share|improve this answer
add comment

It looks like your points are evenly spaced. if so, use the cogo toolbar in 10.1 to partition your line into the required segments. Then use the toolbox tool (link below) to create perpendicular line at the required distance from the end node to both sides of the line (this will all be obvious when you open the tool and see the parameter settings). Once you have the perpendicular lines you can export the lines end vertices using existing ArcGIS toolbox tools.

ftp://lnnr.lummi-nsn.gov/GIS_Scripts/createperpendicularlines.zip

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.