AutoCAD Map/FDO – Spatial Query with displayMngr plugin

Spatial QueryGenerally GIS-data is available on a complete other scale than CAD-users need for their projects.

Importing that GIS-dataset into a CAD-environment gives an overkill of data. It would be very useful to add connections to the feature layers in GIS, limited to the area needed for the project.

This is possible by using AutoCAD Map/FDO Data Connect and a Spatial Query. But this is not very user friendly. That is why vdPConsulting has developed a displayMngr plugin.

This is the workflow:

  • Make sure that the desirable feature layers are connected, by using a pre-defined template or so called .layer files.
  • Load the displayMngr plugin.
  • Start the command “filterWindow” or “filterCrossing”.
  • Indicate the desirable area by picking two points on the map.
  • The plugin creates the SQL filter statements and “inject” these into the definitions of the connected feature layers.

If you want more information about using AutoCAD Map/FDO and GIS-databases or the displayMngr plugin, please contact me.

CAD and GIS, the right tools for the job ( II )

Last week I got the following question; how can I link a Shape-file and an Excel-sheet and create a resulting Shape-file with just a subset of the combined attributes.

In the Shape-file was the geometry of road area’s incl. road-number, road-area-number and road-area-sub-number. In the Excel-sheet there where the same numbers and other details about the road area’s. This Excel-sheet was exported from road management software.
If the AutoCAD Map user is an senior ArcGIS user, than you’ve a challange as consultant.

We did the following in the form of a handson workshop:

AutoCAD Map FDO Create a JoinTo link both files, we use the FDO-function: Create a Join. We need to connect both as FDO-connection into AutoCAD Map and there has to be one or more common fields to use as matching columns.

To make an FDO-connection with an Excel-sheet it is easier to import the sheet into an Access-table first. Than an FDO-connection can be created to the Access-table using the following Connection String: Driver={Microsoft Access Driver (*.mdb)};DBQ=pathnamefilename.mdb When the Excel-data is inside Access, it is also easy to make the columns used to join of the same database-type ( Text or Numbers ).

In the screen below is the FDO-connection to the Shape-file selected as Primary table and the FDO ODBC-connection to the Access-table as Secondary table. For the Join we linked the following columns:
WEG_NR002 -> Weg
WEGV_NR002 -> Vak
WEGVONR002 -> Ond

In the FDO DataGrid is the combination of all columns from both sources visible. To create a resulting Shape-file with just a subset of the attributes is not an easy task in AutoCAD Map. In ArcGIS a piece of cake, is in AutoCAD Map quite a challenge.

To create a new Shape-file with in the DBF-database the content of the original file supplemented with the Excel-sheet, it has to be exported into an SDF-file first. This local geospatial database has the complete combined structure. With FDO Schema Editor it is possible to create a new Shape-file with just the columns needed. With FDO BulkCopy funtionality the content of the temporary SDF-file can be copied over into the empty Shape-file, where just a subset of the columns can be selected.

AutoCAD Map FDO Create a Join

CAD and GIS, the right tools for the job

A while ago I got the following email: “Hi Henny, I’m responsable for projects that have to do with the management and maintenance of our dunes. The spatial information is stored in an Oracle Spatial database by my GIS colleagues. We want to work with the information relevant to our maintenance work directly in an AutoCAD environment. Can you support us ?

I believe this is a common situation with a lot of companies that have both CAD and GIS-departments. Often information is exchanged using Shape or DXF files, whereas AutoCAD Map using the FDO-functionality can connect to the Oracle Spatial database directly.

We did the following in the form of a handson workshop:

We started with the connection to the ArcGIS tables in Oracle as so called Foreign Datastore. These are tables not created by AutoCAD Map and therefor without FDO-metadata. The data is displayed correctly, but working with for example the Style Editor to create thematic maps is somewhat time-consuming.

Therefor we created in a new Oracle schema the desired feature tables using FDO’s Schema Editor incl. the FDO-metadata. Herewith we could make a choice which columns contains information necessary for the management and maintenance duties and which could be skipped. After that we used BulkCopy functionality to migrated the data over from existing tables.

In the ArcGIS tables the area information from polygon geometries where calculated using database triggers after the tables got updated. In AutoCAD Map database attributes are displayed and edited using a Data Table. Here we can also add a so called calculation-column ( see image ). Herewith the area information from polygon geometries are directly available.

Different thematic maps are defined and the style definitions are stored into Layer definition files, making it easy to re-use them in existing CAD-drawings.

Create a Calculation

AutoCAD Map/FDO – Scale Ranges

seen on Neal’s blog – CAD and GIS Integration

In the previous post I’ve described how to use a Spatial Query to limit the amount of GIS-data on your work-session.
But here is an other option: Scale Ranges.

An AutoCAD Map or Civil user can have as many Scale Ranges as necessary. This gives the possibility to setup which details are visible at what scale level.
When the map is opened, for example only road-centerlines are visible, zooming into a certain scale the houses-layer turns on and the centerlines-layer is replaced by a layer with the roadsides etc.

A combination of Spatial Query and Scale Ranges makes is possible to work with large amounts of GIS-data in a CAD-environment.

Scale Ranges
The Scale Range functionality is available in the Style Editor user interface.