Skip to content

jamjpan/shp2rnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

shp2rnet

Convert an ESRI shapefile (.shp, sbx, .dbf) into an "rnet" file.

Requires networkx Requires gdal

To get both: pip install networkx gdal

The rnet (road-network) file format is space separated columns, looks like this:

edge_id from_id to_id from_lng from_lat to_lng to_lat

The edge_id is automatically generated.

Why? Because sometimes graphs come in shapefiles, that is difficult to plot w gnuplot, but with the rnet file, it is very easy. Example:

plot 'output.rnet' using 4:5:($6-$4):($7-$5) w vectors nohead lt rgb 'black' lw 1

Example:

shp2rnet edges.shp -o "output.rnet"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages