Extract points using arcpy.Polyline methods

I was given a SQL table of coordinates and names for average speed over distance cameras. My task was to represent these points, along with their respective roads, in some sort of web app, showing traffic flow in near real-time.

The points depicted the physical location of the cameras, so visually they were not exactly on the road lines. I thought about snapping the points to the start of the closest line, but where’s the fun in that?

In Line 20, one can just directly set the spatial reference without needing to get the string representation:

sr = arcpy.Describe(lyr_line).spatialReference
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s