#Read entire shapefile
shapefile <- read.shapefile("links")
#Write entire shapefile
write.shapefile(shapefile, "temp")
#Read shp, shx, or dbf file
dbf <- read.dbf("links.dbf")
#Write shp, shx, or dbf file
write.dbf(dbf, "links.dbf")
#Calculate header (to clean up GeoMedia shapefile exports)
shapefile <- calc.header(shapefile)
#Add the X and Y coordinates to the dbf list of the shapefile list object
shapefile <- add.xy(shapefile)
#Scale the shapefile by scale.factor
shapefile <- scaleXY(shapefile, scale.factor)
#Create an EMME/2 network batch-in file
emme2.shp(nodes, links, "d211.in")
Run the code above in your browser using DataCamp Workspace