I'm trying to parse a raw .dxf file. Inside the Entities section I can see the polylines I'm looking for (they contain bus routes) and I inside the Objects section I can see each route's data (bus front sign, for instance). My problem is: I can't see how the relationship of entities and objects is defined, so I'm unable to link a route to its data.

Can anybody here explain how entities and objects are related?


It depends on how the dxf was created. If it is using 1. an application (extended entity data, 2. map3d object data, or 3. just autocad blocks.
My guess would be the third option.
To explain that...
The line information is simply stored on a layer. It will have properties such as line type, color, width, elevation and so forth.
The attribute information is Not directly associated (via any type of link) to the line.
There is an object called a block (insert), which is a grouping of one or more items (could contain a lines and attributes also) this group is given an insert location and may have text values assigned as attributes (in almost a database format) that can then be displayed or otherwise interacted with. the block acts more like a point with 1 location for it's insert and can be scaled and rotated around that location.
Unless special design (with gis as a reasoning) went into this data I vote that this is what you are seeing in the dxf.
If this is true you might be able to select the line on or near the insert point of each instance of that block (you may see block names).
I base all this on the fact that if a special application was built for 1. extended entity data or the data creator were using autocad map3d to create 2. object data. GIS would be the main driver behind the data. They can easily use that software to output GIS data in shapefile or other formats.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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