Spatial Manager can read parcel boundaries from Oracle and import them into your drawing or map. This example imports 29 parcels from Santa Monica, California. Select a boundary and you can read its parcel ID, zoning and original area in the Spatial Manager palette.


Available for AutoCAD, BricsCAD, ZWCAD, GstarCAD and Desktop.

1. Prepare the Oracle view

The ODBC provider reads polygon geometry as well-known binary (WKB). If your table stores boundaries as SDO_GEOMETRY, create a view that converts them with SDO_UTIL.TO_WKBGEOMETRY and includes the parcel attributes you want to import. In this example, the parcels are stored in the PARCELS table:

CREATE VIEW PARCELS_WKB AS
SELECT ID, PARCEL_ID, ZONING, AREA_ORIG,
       SDO_UTIL.TO_WKBGEOMETRY(GEOM) AS GEOM_WKB
FROM PARCELS;

Before connecting, check that every row in the view has a WKB geometry:

SELECT COUNT(*) AS PARCELS,
       COUNT(DBMS_LOB.GETLENGTH(GEOM_WKB)) AS WKB_ROWS,
       MIN(DBMS_LOB.GETLENGTH(GEOM_WKB)) AS MIN_BYTES_WKB
FROM PARCELS_WKB;

WKB_ROWS should match the PARCELS count. Spatial Manager skips features with a null geometry during the import.

All 29 parcels in the view have a WKB geometry

All 29 parcels in the view have a WKB geometry

2. Set up the Oracle connection in Windows

  • Use the 64-bit Oracle Instant Client with its ODBC driver. Have your Oracle service alias ready. For an Oracle Autonomous Database, set TNS_ADMIN to the wallet folder that contains the network configuration.
  • Open ODBC Data Source Administrator (64-bit). On the User DSN tab, click Add, select the Oracle driver and click Finish.
User DSN tab of the 64-bit ODBC Data Source Administrator

User DSN tab of the 64-bit ODBC Data Source Administrator

  • Enter a data source name (SAMPLE in this example), the TNS service name (sample_low) and an Oracle user with access to the view. Click Test Connection, enter the password and save the connection once the test succeeds.
Oracle ODBC driver configuration with SAMPLE as the data source name and sample_low as the TNS service name

Oracle ODBC driver configuration with SAMPLE as the data source name and sample_low as the TNS service name

3. Choose the view and geometry field

  • Open a blank drawing or map and run the SPM command to open the main palette (for Spatial Manager Desktop, go to the docked panel). Right-click User data sources and choose Create user data source. Select Open Database Connectivity ODBC.
  • Choose User Data Source Name (DSN), select SAMPLE, enter your Oracle credentials and click Connect. Leave the table owner blank if you own the view.
  • Under Table, choose PARCELS_WKB. Select Any type (WKB) and set WKB field to GEOM_WKB. Click Next, then Finish to add the source to the palette.
The WKB field holds the boundary of each parcel

The WKB field holds the boundary of each parcel

4. Import the boundaries

  • Drag the new data source into the drawing or map. In Import parameters, choose Polylines for lines and borders, and Borders for polygons. Enable Import Features data as entities Extended Entity Data (EED) to attach the attributes to each boundary.
  • Leave Import only Features in the current view cleared to bring in all 29 parcels.
Import parcel outlines and keep their Oracle attributes

Import parcel outlines and keep their Oracle attributes

  • Click Next and enable Overwrite source CRS. In the CRS catalog, choose NAD83 / California zone 5 (ftUS) (EPSG:2229), the coordinate system of the sample. Leave Transform the coordinates cleared to keep the original coordinates, then click Finish.
The Santa Monica sample uses US survey feet

The Santa Monica sample uses US survey feet

5. Check a parcel

The import report shows 29 features read and 29 written. Close the report, zoom to the extents and select a parcel boundary to see its attributes.

Parcel 14290: ZONING M1 and AREA_ORIG 126989.9375

Parcel 14290: ZONING M1 and AREA_ORIG 126989.9375

For parcel 14290, the palette shows the same values as Oracle for ZONING (M1) and AREA_ORIG (126989.9375).

Learn more about importing from Excel, CSV or ODBC data providers and accessing ODBC connections.

Note: Some features are available only in the Standard or Professional editions.