Is This Content Helpful?
We're glad to know this article was helpful.
What do cVRPShapeDir and NetToShape/cShapeDir do?
NetEngine comes with many sample applications that illustrate its available functionality.
The vrpShapeDir.dll contains functionality that can convert a network (often a result network) into a shapefile and a list of narrative directional instructions for driving along that path.
The NetToShape.dll and ShapeDir.dll contain functionality that performs the same types of operations, but optimized for speed and accuracy.
The libraries contain
· The vrpShapeDir.dll contains a cVRPShapeDir object class.
· The NetToShape.dll contains a Net2Shape() function, and the ShapeDir.dll contains a cShapeDir object class.
Why a newer version
The vrpShapeDir library is the old version, written to accompany NetEngine 1.1. NetEngine 1.2 includes it also, but offers the NetToShape library and the ShapeDir library as replacement.
vrpShapeDir is a good utility, but some have found its performance to be slow. If you find the same results, then we recommend you replace it with a combination of NetToShape and ShapeDir.
What they do
· vrpShapeDir library is written so that a result network can be converted into a MapObjects Line object and a set of descriptive turn-by-turn instructions.
· NetToShape library converts a result network into an output shapefile on disk. The ShapeDir library creates descriptive turn-by-turn directions from
this output shapefile created by NetToShape.
When they were made
· vrpShapeDir was originally written in 1998 for NetEngine version 1.1.
· NetToShape and ShapeDir were written in 2000 for NetEngine version 1.2.
How they were written
· vrpShapeDir was originally written using Visual Basic version 5.0. It uses MapObjects in order to build the line shapes and read address information out of the line layer's attribute table to build directions. NetEngine ships with all source code behind this library, which you can modify and recompile.
· NetToShape was written in C. This was done because many in the NetEngine developer community found the vrpShapeDir library to be very slow. The speed problem was with MapObjects ability to query very large datasets for retrieval of shapes and attributes. The NetToShape library on the other hand reads the binary shapefile files directly from disk, speeding things up considerably.
The ShapeDir library was written using Visual Basic. Its performance is very good for most purposes.
NetEngine ships with all source code behind these two libraries, which you can modify and recompile.
Samples illustrating their use
· MoNet uses NetToShape.dll and ShapeDir.dll
· TourDemo uses vrpShapeDir.dll