You are on page 1of 64

Autodesk Geospatial Customization Suite 2008

Customization Roadmap

February 2008
© 2008 Autodesk, Inc. All Rights Reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be
reproduced in any form, by any method, for any purpose.

Certain materials included in this publication are reprinted with the permission of the copyright holder.

Trademarks
The following are registered trademarks or trademarks of Autodesk, Inc., in the USA and other countries: 3DEC (design/logo), 3December,
3December.com, 3ds Max, ActiveShapes, Actrix, ADI, Alias, Alias (swirl design/logo), AliasStudio, Alias|Wavefront (design/logo), ATC, AUGI,
AutoCAD, AutoCAD Learning Assistance, AutoCAD LT, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk, Autodesk
Envision, Autodesk Insight, Autodesk Intent, Autodesk Inventor, Autodesk Map, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSnap,
AutoSketch, AutoTrack, Backdraft, Built with ObjectARX (logo), Burn, Buzzsaw, CAiCE, Can You Imagine, Character Studio, Cinestream, Civil
3D, Cleaner, Cleaner Central, ClearScale, Colour Warper, Combustion, Communication Specification, Constructware, Content Explorer,
Create>what's>Next> (design/logo), Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids, DesignProf, DesignServer,
DesignStudio, Design|Studio (design/logo), Design Your World, Design Your World (design/logo), DWF, DWG, DWG (logo), DWG TrueConvert,
DWG TrueView, DXF, EditDV, Education by Design, Exposure, Extending the Design Team, FBX, Filmbox, FMDesktop, Freewheel, GDX Driver,
Gmax, Heads-up Design, Heidi, HOOPS, HumanIK, i-drop, iMOUT, Incinerator, IntroDV, Inventor, Inventor LT, Kaydara, Kaydara (design/logo),
LocationLogic, Lustre, Maya, Mechanical Desktop, MotionBuilder, Mudbox, NavisWorks, ObjectARX, ObjectDBX, Open Reality, Opticore,
Opticore Opus, PolarSnap, PortfolioWall, Powered with Autodesk Technology, Productstream, ProjectPoint, ProMaterials, Reactor, RealDWG,
Real-time Roto, Recognize, Render Queue, Reveal, Revit, Showcase, ShowMotion, SketchBook, SteeringWheels, StudioTools, Topobase, Toxik,
ViewCube, Visual, Visual Bridge, Visual Construction, Visual Drainage, Visual Hydro, Visual Landscape, Visual Roads, Visual Survey, Visual Syllabus,
Visual Toolbox, Visual Tugboat, Visual LISP, Voice Reality, Volo, Wiretap, and WiretapCentral

The following are registered trademarks or trademarks of Autodesk Canada Co. in the USA and/or Canada and other countries: Backburner,
Discreet, Fire, Flame, Flint, Frost, Inferno, Multi-Master Editing, River, Smoke, Sparks, Stone, and Wire

All other brand names, product names or trademarks belong to their respective holders.

Disclaimer
THIS PUBLICATION AND THE INFORMATION CONTAINED HEREIN IS MADE AVAILABLE BY AUTODESK, INC. "AS IS." AUTODESK, INC. DISCLAIMS
ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS.

Published By: Autodesk, Inc.


111 Mclnnis Parkway
San Rafael, CA 94903, USA
Contents

Chapter 1 Autodesk Geospatial Applications . . . . . . . . . . . . . . . . . 1


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Geospatial Product Line . . . . . . . . . . . . . . . . . . . . . . . . . .2
AutoCAD Map 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Autodesk MapGuide Enterprise and MapGuide Open Source . . . . . . .4
Autodesk Topobase . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5
AutoCAD Raster Design . . . . . . . . . . . . . . . . . . . . . . . . . .6
Autodesk Design Review . . . . . . . . . . . . . . . . . . . . . . . . . .7
Autodesk RealDWG . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Autodesk DWF Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . .9

Chapter 2 Geospatial Data . . . . . . . . . . . . . . . . . . . . . . . . . . 11


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Data Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Chapter 3 Autodesk Geospatial Architecture . . . . . . . . . . . . . . . . 17


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
AutoCAD Map 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Autodesk MapGuide Enterprise . . . . . . . . . . . . . . . . . . . . . . 18
Autodesk Topobase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
AutoCAD Raster Design . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Autodesk Design Review . . . . . . . . . . . . . . . . . . . . . . . . . 22

iii
Chapter 4 Autodesk Geospatial APIs . . . . . . . . . . . . . . . . . . . . . 23
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
AutoCAD Map 3D APIs . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Autodesk MapGuide Enterprise and MapGuide Open Source
APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Geospatial Platform API Concepts . . . . . . . . . . . . . . . . . . . . 30
Autodesk Topobase APIs . . . . . . . . . . . . . . . . . . . . . . . . . . 33
FDO Data Access Technology . . . . . . . . . . . . . . . . . . . . . . . 36
AutoCAD Raster Design API . . . . . . . . . . . . . . . . . . . . . . . . 37
Autodesk Design Review API . . . . . . . . . . . . . . . . . . . . . . . 37
Autodesk RealDWG API . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Autodesk DWF Toolkit . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Chapter 5 Autodesk Geospatial Samples . . . . . . . . . . . . . . . . . . . 41


Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
AutoCAD Map 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
AutoCAD Map 3D Geospatial Platform API . . . . . . . . . . . . 41
AutoCAD Map 3D ObjectARX APIs . . . . . . . . . . . . . . . . . 49
AutoCAD Map 3D ActiveX and VBA APIs . . . . . . . . . . . . . 50
AutoCAD Map 3D AutoLISP API . . . . . . . . . . . . . . . . . . 50
Autodesk MapGuide Enterprise . . . . . . . . . . . . . . . . . . . . . . 50
Developer Guide Samples . . . . . . . . . . . . . . . . . . . . . . 50
Viewer Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
MapGuide Studio API Samples . . . . . . . . . . . . . . . . . . . 55
Other MapGuide Samples . . . . . . . . . . . . . . . . . . . . . . 55
Autodesk Topobase . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Autodesk RealDWG 2008 . . . . . . . . . . . . . . . . . . . . . . . . . 56
Autodesk Design Review . . . . . . . . . . . . . . . . . . . . . . . . . 56

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

iv | Contents
Autodesk Geospatial
Applications 1
Overview
Custom geospatial solutions work with data from multiple sources that are
created using diverse applications in complex workflows. Integrating geospatial
technology into a customer’s business process presents significant challenges
when the integrity of requirements and data may be in doubt. Developers rely
on technical documentation, examples, and shared community expertise to
pick the right tools for successful delivery.
Autodesk provides a complete line of products designed to meet the challenges
of successful solution development in complex environments. The products
work with geospatial and engineering data, in multiple formats and across
multiple systems. A diverse set of application programming interfaces (APIs)
and scripting tools allows products to be customized to add new features,
improve workflow integration, or access new types of data.
In this guide you will find:

■ An overview of the core Autodesk geospatial product line

■ Overviews of related and supplementary products to the geospatial product


line

■ Descriptions of the range of use and customization options available for


each product

1
Geospatial Product Line
The Autodesk geospatial product line covers a range of functionality, including
products for creating, editing, deploying, and analyzing geospatial data on
the desktop or across the Internet.
Core Geospatial Products
Product Description

AutoCAD® Map 3D Desktop application for creating and edit-


ing maps. AutoCAD Map 3D includes the
full capabilites of AutoCAD, plus additional
functionality for working with geospatial
data.

Autodesk MapGuide® Enterprise and Web-based applications for map display


MapGuide Open Source and analysis. Combine data from multiple
sources into a single map, then share it
across the Internet or intranet. The includ-
ed viewer comes in 2 versions. The AJAX
viewer runs in nearly any browser on any
operating system. The DWF viewer runs as
an Internet Explorer plug-in on Windows.

Autodesk Topobase™ Built on top of AutoCAD Map 3D and Au-


todesk MapGuide Enterprise, Topobase
provides rule-based infrastructure and asset
management tools optimized for specific
industries. Topobase includes a desktop-
based client, a Web-based client, and sev-
eral toolkits customized for specific indus-
tries.

All the core geospatial products include Feature Data Objects (FDO) Data
Access Technology. FDO is an API for manipulating, defining, and analyzing
geospatial information regardless of where it is stored. FDO uses a

2 | Chapter 1 Autodesk Geospatial Applications


provider-based model for supporting a variety of geospatial data sources, where
each provider supports one or more data formats or data stores.
Complementary Products
Product Description

AutoCAD® World-wide standard for drafting software.


AutoCAD is the base 2D and 3D design
platform for AutoCAD Map 3D and is in-
cluded in the desktop client of Autodesk
Topobase.

AutoCAD® Raster Design Extension to AutoCAD and AutoCAD Map


3D that provides raster data editing and
conversion.

Autodesk® Design Review Stand-alone product for reviewing and


marking up drawing files. With files that
contain geographic information, Design
Review can use GPS coordinates to display
locations in real-time.

AutoCAD® OEM CAD development platform that provides


tools to build custom AutoCAD-based
software products for specific markets. Us-
ing AutoCAD OEM, developers can create
AutoCAD applications that provide exactly
the features their users need.

Autodesk RealDWG™ A software library that allows C++ and .NET


developers to read and write AutoCAD®
DWG™ and DXF™ files.

Autodesk DWF™ Toolkit A software library that allows C++ develop-


ers to read and write 2D and 3D Design
Web Format (DWF) files.

Geospatial Product Line | 3


AutoCAD Map 3D
AutoCAD Map 3D is a desktop-based map creation and editing program.
Traditionally, data management staff who needed to edit CAD-based
engineering data and GIS-based mapping data would use separate software
programs to perform those tasks. AutoCAD Map 3D, however, provides users
with the capability to edit and view CAD and GIS data from within the same
application. AutoCAD Map 3D contains the data management functionality
to allow users to complete many common CAD-to-GIS workflows in a single
software environment.
AutoCAD Map 3D is built on AutoCAD, so it works directly with CAD data
using standard AutoCAD commands. It also extends AutoCAD to provide
significant improvements to the data handling workflow. For example, users
can import objects from multiple DWG files into a single session, edit objects
within those files, then save the changes to the original files.
Using AutoCAD Map 3D, CAD drawing objects can have attributes similar to
the attributes attached to GIS data. The objects can also be classified and
annotated, adding to CAD data some of the power needed for true GIS analysis.
In addition to the extensions for working with drawing objects, AutoCAD
Map 3D can read, write, and edit geospatial data in all formats supported by
FDO. GIS data can be edited using standard AutoCAD operations and
engineering-precision editing tools. Changes are written back to the data
source in its native format.
AutoCAD Map 3D customization often takes the form of a new extension or
add-on that may be invoked from within the application and that simplifies
or enhances out-of-the-box functionality. Custom extensions for AutoCAD
Map 3D may involve importing proprietary data formats, streamlining
repetitive analysis, or simplifying the display.

RELATED For more information about AutoCAD Map 3D, see the following:
■ www.autodesk.com/map3d

Autodesk MapGuide Enterprise and MapGuide


Open Source
Autodesk MapGuide Enterprise offers a powerful platform for distributing
spatial information quickly, easily, and cost-effectively. Based on MapGuide

4 | Chapter 1 Autodesk Geospatial Applications


Open Source, Autodesk MapGuide Enterprise offers simple deployment and
flexible development options.
MapGuide Open Source is an open source software development project run
by the Open Source Geospatial Foundation, mapguide.osgeo.org. It is based on
code originally donated by Autodesk, and is under active development with
support from Autodesk and members of the geospatial community. Autodesk
MapGuide Enterprise shares much of its code with MapGuide Open Source,
and adds commercial-grade support, services, and quality assurance.
The MapGuide products make mapping data available over the Internet or in
a secure distributed environment. Remote users connect to a MapGuide site
using a standard Web browser. The MapGuide viewer appears in the browser
window. The viewer includes built-in tools for many standard operations like
panning, zooming, and selection. Additional tools can be created with the
MapGuide Web API, using ASP .NET, PHP, or Java/JSP as a development
environment.
Autodesk MapGuide Studio is a companion product that helps manage all
aspects of preparing maps and geospatial data for distribution on the Internet.
With MapGuide Studio, a user can select the data sources to display in the
map, create and style the map layers, and customize the look, feel, and
functionality of the application.
Developers commonly customize Autodesk MapGuide Enterprise and
MapGuide Open Source to integrate mapping capability with corporate or
organizationally branded websites. The MapGuide interface may be customized
to enhance its capability or the server component of MapGuide may be built
upon to satisfy complex integration or analysis needs.

RELATED For more information about Autodesk MapGuide Enterprise and


MapGuide Open Source, see the following:
■ www.autodesk.com/mapguideenterprise

■ mapguide.osgeo.org

Autodesk Topobase
Autodesk Topobase provides infrastructure design and asset management
capabilities to users throughout an organization. You can use Autodesk
Topobase to plan, design, and analyze geometric and attribute data graphically
using the full capabilities of AutoCAD Map 3D and AutoCAD.

Autodesk Topobase | 5
Autodesk Topobase components

Autodesk Topobase comprises several components:

■ Topobase Client — a desktop client built on AutoCAD Map 3D, extending


basic AutoCAD Map 3D functionality (such as visualization, creating,
editing, and plotting) to include additional domain-specific functionality
such as data and business rules, workflows, enhanced querying and analysis,
and other database-driven capabilities.

■ Topobase Web — a Web application built on Autodesk MapGuide


Enterprise, and used to share infrastructure and asset information to
non-CAD users, and also to enable data creation, editing, and querying
through a Web interface.

■ Topobase Administrator — an application for managing data structures in


the Oracle Spatial database, controlling access to data, managing data and
business rules, and to facilitate solution (module) development,
customization and extension, including Web access.

■ Industry-specific vertical modules — extensions to Topobase with their


own data models and business rules. Industry-specific modules manage
specific classes of infrastructure, such as gas, water, waste water, and electric.
Topobase data models may be modified to conform to the asset
management needs of a particular domain or organization. Workflows and
business rules provide repeatable and consistent processes throughout your
organization.

Autodesk Topobase offers a range of customization alternatives for integrating


Topobase with enterprise business applications, streamlining the user interface,
or adding domain-specific functionality.

RELATED For more information about Autodesk Topobase, see the following:
■ www.autodesk.com/topobase

AutoCAD Raster Design


AutoCAD Raster Design is Autodesk's solution for inserting, manipulating,
editing, and viewing geospatial imagery data inside the AutoCAD environment.
AutoCAD Raster Design expands the image viewing capabilities of AutoCAD
platform products and allows the designer to view the imagery side-by-side

6 | Chapter 1 Autodesk Geospatial Applications


with CAD objects for the purposes of visual inspection, positional correction,
or even for high quality map and drawing creation.
AutoCAD Raster Design allows AutoCAD users to effectively use scanned paper
drawings, aerial photographs, digital elevation models (DEM), and satellite
data inside your AutoCAD drawings. Users can insert bitonal, grayscale, and
color raster images into your AutoCAD drawings, then correlate, edit, analyze,
and export the results.
Raster Design enables the analysis and display of image data from a wide range
of sources, including satellite imagery, wavelet compressed images, and DEM,
all within the AutoCAD environment. Raster Design also provides efficient
tools for cleaning and archiving paper-based drawings in digital form.
AutoCAD Raster Design is often customized to automate complex image
editing workflows.

RELATED For more information about AutoCAD Raster Design, see the following:
■ www.autodesk.com/rasterdesign

Autodesk Design Review


Autodesk Design Review is a free software application that allows a project’s
team members to view, print, measure, and mark up 2D and 3D designs
without needing access to the original design creation application. Design
Review works with Design Web Format (DWF) files.
DWG TrueView™, a stand-alone Autodesk drawing (DWG) viewing tool that
comes with Design Review, lets you work with full fidelity Autodesk drawing
(DWG) and drawing exchange format (DXF) files. You can publish DWG files
from DWG TrueView as DWF files and take advantage of all the features in
Design Review.

NOTE Autodesk Design Review and DWG TrueView work with drawing objects,
but not with AutoCAD Map 3D object data and other additions. FDO data must
be converted to CAD drawing objects before it is visible to Autodesk Design Review
or DWG TrueView. See Data Types on page 11 for details about CAD drawing
objects and geospatial data.

Design Review includes the following capabilities:

■ View, print, and publish DWF, DWG, DXF, DGN, JT, raster files

Autodesk Design Review | 7


■ Measure, markup, and annotate tools

■ Combine project data, such as images and specifications, in a single file

■ Track status to manage engineering change orders

■ Round-trip markup integration with Autodesk design software, so designers


can overlay changes and comments on the original computer-aided design
(CAD) file

RELATED For more information about Autodesk Design Review, see the following:
■ www.autodesk.com/designreview

Autodesk RealDWG
The RealDWG developer toolkit is a software library that allows C++ and .NET
developers to read and write AutoCAD DWG and DXF files. This technology
was formerly known as ObjectDBX™.
RealDWG is a subset of ObjectARX and contains the APIs for reading and
writing AutoCAD DWG and DXF files. RealDWG is a self-contained toolkit
that may be invoked within stand-alone software development environments
and does not contain either data viewing capability or access to the AutoCAD
User Interface.

NOTE RealDWG works with drawing objects, but not with AutoCAD Map 3D
object data or other extensions on CAD drawing elements. It cannot read or write
any of the geospatial data managed with FDO. See Data Types on page 11 for
details about CAD drawing objects and geospatial data.

The RealDWG 2008 SDK is licensed to customers at a cost and subject to


approval by Autodesk.

RELATED For more information about RealDWG, see the following:


■ www.autodesk.com/realdwg

8 | Chapter 1 Autodesk Geospatial Applications


Autodesk DWF Toolkit
The Autodesk DWF Toolkit is an API for reading and writing 2D or 3D DWF
files. It includes C++ libraries and source code, and works cross-platform
(Windows, Mac, Linux).

RELATED For more information about the Autodesk DWF Toolkit, see the following:
■ www.autodesk.com/dwftoolkit

Autodesk DWF Toolkit | 9


10
Geospatial Data
2
Overview
Data is at the center of any geospatial application. Geospatial processing often
involves combining data of different types from different sources. It is important
that applications work with data in its original format whenever possible.
Unnecessary data conversion adds extra work and introduces the possibility of
data loss or inaccuracy.

Data Types
Common data types used in geospatial workflows include:

■ CAD data

■ GIS feature data

■ GIS raster data

CAD Data

CAD data refers to the lines and symbols on a typical drafting page. A standard
CAD drawing contains all its data within a single file, such as an AutoCAD DWG
file. This makes it convenient to edit the file, but it limits the amount and types
of data that can be stored together.
Objects in a CAD drawing are called drawing objects, DWG objects, or AutoCAD
entities. The objects are formed by lines and shapes on the page. The positioning
of graphic objects in a drawing may represent the location of objects in the real
world, but this is not necessarily the case. Although CAD drawings are generally

11
organized into layers, with similar types of objects on the same layer, this is
not a strict requirement. For example, a single layer might contain both the
drawing elements that represent hydrants and the water lines connecting
them. In a CAD drawing, the hydrant and water line layer may even include
the graphic representation of labels and attributes, referred to as annotation.
Each individual object or annotation can have its own unique style.

GIS Feature Data

A geographic information system (GIS) generally takes a different approach


from a CAD drawing. In a GIS, there is a clear distinction between the raw
data and how it is displayed. The data will contain location coordinates and
attributes, but no intrinsic information about how it should look.
A feature is a collection of coordinates that together represent the real world
location of a single object. A feature could represent a road, the location of a
light post, a river, a voting district, or anything that can be represented by
geographic coordinates. The coordinates for a feature are treated as a group.
In many cases, the feature will also contain attributes or properties that provide
additional information. These attributes can be of nearly any type, such as
the name of a river, the construction date of a building, the population of a
city, or the number of lanes in a road.
A feature class is a collection of features of the same type that logically belong
together. Some examples are the roads in a city, parcels of land, or locations
of light posts.
Displaying features requires assigning a style, or a set of rules that determine
how the features should look. Different styles applied to the same features

12 | Chapter 2 Geospatial Data


will result in different visual results. For example, there could be a set of
features representing property boundaries. For each feature representing an
individual lot, the attribute data could also include the assessed property value
and the allowable use for the property. A style that assigns colors to the lots
based on the property value would produce a different result than a style that
assigns colors based on allowable use. Assigning a style based on attribute
values is also called theming.

GIS Raster Data

Raster data, pixel-based data such as digital photographs, can be used as


overlays or backgrounds for feature and drawing data. In GIS applications,
raster data can also represent grid data in which each unit or cell in the grid
is a representative qualitative value covering a small area on a map. For
example, in a digital elevation model (DEM), each pixel contains an elevation
value for a location on the map. The elevation values in a DEM can be used
to style and shade the raster image.
Raster files used in GIS applications must be georeferenced so the pixels in
the raster correspond with locations on the map. Some raster file formats
contain internal georeference data, while others require either an external file
with the data or manual location adjustment.

Data Types | 13
DWF

One additional data format that should be discussed is the Design Web Format
(DWF), which Autodesk developed as a specialized data format used for storing
and sharing map and design drawing data. A single DWF file can contain a
particular representation of an AutoCAD drawing or AutoCAD Map 3D map,
somewhat like an electronic version of a single printed map.
DWF is used primarily for output. It contains a visual representation of the
data, but it does not have the additional information that describes individual
features or their attributes. This results in a much smaller file size, which makes
it an excellent way to distribute maps and other drawings.
Autodesk Design Review offers a way for users of Autodesk technology to add
annotation to a DWF file without altering any of the original data. Using
Design Review, technical and nontechnical users can collaboratively share,
review, and mark up drawings.

RELATED For more information about DWF, see the following:


■ www.autodesk.com/dwf

■ www.autodesk.com/dwf-developers

■ www.autodesk.com/dwftoolkit

Data Sources
GIS data is found in more diverse sources and formats than CAD data. A
complex geospatial workflow may include the use of GIS data from files on
the local file system, from data in a relational database, and even from data
on the Web.
Common GIS data sources include:

■ File-based data

■ Relational databases

■ Web services

14 | Chapter 2 Geospatial Data


File-based Data Sources

File-based data sources are stored in individual files or sets of files on a user’s
personal computer or a local network.
CAD data is file-based. In a standard CAD workflow, each drawing is a
self-contained file. Objects can be copied from other drawings, but the copied
objects do not retain any link to the source objects.
AutoCAD Map 3D adds additional functionality for working with CAD data
from multiple drawings. Using AutoCAD Map 3D, a single DWG file can attach
other DWG files and “query in” objects for display or editing. These attached
DWGs can be shared between multiple users. For example, a DWG containing
road locations for a community can be attached to other DWG files for water
and utilities. Changes to the road data will show in any other drawings that
attach the road data.
Other file-based data sources are designed to store geospatial feature data. A
good example of this is Spatial Data Format (SDF), which is used in many
Autodesk geospatial products. SDF is an open format that can be read and
written using a standard FDO provider. It offers many of the advantages of a
full relational database, but with simpler administration.
Raster data is often stored in individual files, using formats like TIFF, GIF,
PNG, JPEG, and JPEG 2000. Some of these formats contain internal
georeferencing data, but others require an external World File or some other
method.

Relational Databases

Some relational databases, such as Oracle, have been adapted for storing
geospatial data. These “spatial databases” have additional functionality for
managing geographic data, including the ability to store GIS feature data and
create queries using geometric comparison. For example, using a spatial
database, it is possible to find all features that lie within a geographic area, or
that cross a certain road, without invoking a traditional GIS application to
perform the spatial analysis.
Because spatial databases have been optimized for data retrieval and editing,
access may be faster than by using other methods when working with large
quantities of data. Applications working with large data sets or that have large
numbers of users will often require the use of a relational database for the
storage of some geographic and attribute information.
Both feature data and raster data can be stored in spatially enabled relational
databases. Many geospatial workflows also require the analysis of non-spatial

Data Sources | 15
attribute data combined with geographic features. In modern enterprise
systems, most non-spatial attribute data is stored in relational databases.
Through FDO, many Autodesk applications have the capability to access both
spatial and non-spatial data stored in relational databases.

Web Services

A Web service is a software system designed to support interoperable


machine-to-machine interaction over a network. The Open Geospatial
Consortium (www.opengeospatial.org) has created standards for geospatial Web
services, including Web Map Service (WMS) and Web Feature Service (WFS).
Web services that implement WMS and WFS standards may be called to request
map images or geographic features, respectively. These standards define HTTP
requests that can be sent to a Web server. The Web server processes the request
and returns a map image or other geospatial data.
A WMS server returns an image suitable for display in a Web browser. The
HTTP request for the WMS contains parameters including values such as the
map area to display, the spatial reference system to use, the size of the image,
and the image format. Using image formats that support transparency, it is
possible to build a map by overlaying images representing different layers.
A WMS server can optionally return information about features close to a
specific point on the image. This could be used, for example, in an application
that first queries the WMS server for a map image, then allows the user to
click on the image for more information about a specific feature.
A WFS server returns a list of geographic features, in XML format. Optionally,
the WFS server can also allow editing of feature data. Because it is more capable
than WMS, the WFS specification is more complex, with more options. At a
minimum, though, a WFS server must be capable of returning a list of features
within a given boundary that satisfy certain other conditions. WFS servers use
the Geography Markup Language (GML) for encoding data.

RELATED For more information about WMS and WFS, see the following:
■ www.opengeospatial.org/standards/wms

■ www.opengeospatial.org/standards/wfs

■ www.opengeospatial.org/standards/gml

16 | Chapter 2 Geospatial Data


Autodesk Geospatial
Architecture 3
Overview
The Autodesk geospatial products are closely related to each other. They share
common data formats, and in many cases they even share components.
Some desktop products, such as AutoCAD Map 3D and the Topobase desktop
client, are built on the AutoCAD platform, with specific extensions for working
with geospatial data. The Topobase Web application is built on Autodesk
MapGuide Enterprise.
Some other products, such as Autodesk Design Review, are stand-alone products
for working with specific file formats.
Full details are provided in the description of each product.

AutoCAD Map 3D
One of the strengths of AutoCAD is the way its technology can be incorporated
into other products such as AutoCAD Map 3D. AutoCAD Map 3D is a stand-alone
application, built on top of AutoCAD, that behaves as a desktop application.
Customization of AutoCAD Map 3D always requires the invocation of the full
AutoCAD Map 3D application.

17
As shown below, AutoCAD Map 3D extends the functionality of AutoCAD in
a few different ways:

■ Managing maps and layers containing drawing objects or geospatial feature


data.

■ Bringing geospatial data into the AutoCAD Map 3D working space so it


can be displayed and edited using standard CAD operations.

■ Styling geospatial data using standard GIS methods.

■ Extending the capabilities of drawing objects so they share many of the


features of geospatial data. For example, object data attached to a drawing
object is similar to attributes or properties of a GIS feature.

AutoCAD Map 3D Architecture

AutoCAD Map 3D
Managing maps and layers
Reading and writing geospatial data via FDO
Analyzing and manipulating using the Geospatial Platform API
Styling geospatial data
Attaching object data to drawing objects
Classifying drawing objects
Combining drawing objects from multiple DWG files

Autodesk Raster Design (optional)


Editing raster files
Converting raster data to vector

AutoCAD
Standard CAD operation for creating and editing drawing objects
Basic framework for customization, adding commands and menus

Autodesk MapGuide Enterprise


Autodesk MapGuide Enterprise and MapGuide Open Source have a 3-tiered
architecture.

18 | Chapter 3 Autodesk Geospatial Architecture


MapGuide Architecture

The server tier handles data access and manages the resources on the site. The
site server controls access to the resources based on user and group
identification. It also performs computationally intensive operations like
creating and rendering maps.

NOTE In a MapGuide installation, resources include the elements required to


create and display a map, such as data sources, layer definitions, and map layouts.
Data sources describe what data is being used in the map, and where it is located.
Layer definitions describe which data source to use for a layer and how it should
be styled. Map definitions describe which layers form the map, and it what order.
Internally, all resources are stored as XML documents.

The web tier manages communication between the server tier and the client
tier. The web tier includes the MapGuide Web Server Extensions, which are
accessed through the Web API. This API includes the Geospatial Platform API
for data access and analysis, plus classes and methods specific to MapGuide.

Autodesk MapGuide Enterprise | 19


See Geospatial Platform API Concepts on page 30 for more details. MapGuide
applications use the Web API for all data access and analysis functions.
User interaction happens in the client tier. Thin client applications only require
a Web browser, but the thick client applications require additional programs
installed on the client computer.
Two applications are available as authoring tools used to define resources on
the MapGuide server. Autodesk MapGuide Studio offers the most functionality.
It handles all aspects of preparing maps and geospatial data for use with
MapGuide. MapGuide Web Studio is a free, open source, Web-based authoring
tool for defining data source, layer, and map resources. It is an AJAX application
that works across platforms and with multiple Web browsers including Firefox,
Safari, and Internet Explorer. MapGuide Web Studio is included with MapGuide
Open Source.
Most users who interact with MapGuide will see the viewer applications that
make up the client tier. The viewer applications display the map and handle
user requests, most of which are sent to the web tier for processing. The
MapGuide DWF Viewer runs as a browser plug-in inside Internet Explorer on
Windows. It uses Autodesk Design Review for its core functionality. The AJAX
Viewer is a JavaScript application that runs within most standard Web browsers,
including Mozilla Firefox, Safari, and Internet Explorer.
Buttons and commands in a viewer will often invoke operations that are
processed by the web tier.

RELATED For more information about Autodesk MapGuide Enterprise, Autodesk


MapGuide Studio, and MapGuide Open Source, see the following:
■ www.autodesk.com/mapguideenterprise

■ www.autodesk.com/mapguidestudio

■ mapguide.osgeo.org/downloads.html

Autodesk Topobase
Topobase provides organization-wide access to spatial information from
engineering, GIS, operations, and business teams. Data is stored in an Oracle
Spatial database, which provides the security, integrity, and performance
required for an enterprise-level application. The Topobase desktop client is
built on AutoCAD Map 3D, with additional industry-specific modules. The

20 | Chapter 3 Autodesk Geospatial Architecture


Topobase Web applications are built on Autodesk MapGuide Enterprise, and
provide the ability to deliver data wherever it is needed.
Topobase Architecture

Oracle Spatial
Application Server Client
Relational Database
Topobase
Administrator
User Management/
Oracle Security

Partner App
Wastewater
Legacy GIS

Electric
Survey
Water
Data Models

Land
Gas
Topobase Client
Includes Map 3D
Workflows/
Business Rules

Partner App
Wastewater

Electric
Survey
Water
CRM

Land
Jobs

Gas
DWF/AJAX
(long transactions)
Topobase Web Web browser
Includes MapGuide Enterprise

Topology DWF/AJAX
ERP

MapGuide Enterprise Web browser

The following table shows the API components that together make up the
Topobase API.

API component Applies to: Technology

Server API Server-side : Loaded into Oracle db Java and PL/SQL

Framework API Client-side : TB Client, Web, & Administra- C#, VB.NET


tor
Forms API

Feature Rules API

Map API

Utility API

Autodesk Topobase | 21
API component Applies to: Technology

Workflows API

Modules API Client-side : TB Client, Web, Administrator,


& modules
Templates API

Plug-ins Client-side : TB Client, Web, Administrator, Any .NET language


& modules

AutoCAD Raster Design


Raster Design is an add-on component that runs directly on top of the
AutoCAD line of products, including AutoCAD, AutoCAD Map 3D, and
AutoCAD Civil 3D. The Raster Design installer identifies the AutoCAD-based
applications already installed on your computer and creates appropriate start
up icons to launch Raster Design on top of each of those products.
AutoCAD Raster Design customizations are scripts that are run from within
the running AutoCAD environment.

Autodesk Design Review


Autodesk Design Review is a stand-alone application that runs on Microsoft
Windows. The application can also run embedded in Microsoft Internet
Explorer and in Microsoft Office applications.
The DWF Viewer component of Autodesk MapGuide Enterprise and MapGuide
Open Source uses Design Review as an ActiveX control within Internet
Explorer.

22 | Chapter 3 Autodesk Geospatial Architecture


Autodesk Geospatial
APIs 4
Overview
The APIs for Autodesk geospatial products provide a wide range of customization
options, from basic automation to more complex data manipulation and
analysis. Using the APIs it is possible to extend the functionality of the products
to fit the needs of diverse organizations.
Some of the APIs ship with the products, but others require using a separate
software development kit (SDK). Full details are provided in the description for
each product.
AutoCAD Map 3D API Summary
API Language Customization Capabilities

Map 3D ObjectARX API C++, .NET Working with drawing objects, object data,
and drawing sets.

Geospatial Platform API .NET Working with geospatial feature data, co-
ordinate systems, and geometric analysis

Map 3D Platform API .NET Maps, layers, and resources in AutoCAD


Map 3D

ActiveX API VB, VBA Simple automation,including working with


some Map 3D functionality such as draw-
ing sets, queries, and object data.

23
API Language Customization Capabilities

AutoLISP API AutoLISP Similar capabilities as the ActiveX API, plus


support for map plotting and topology.

FDO (Feature Data Objects) C++, .NET Advanced functionality for working with
API geospatial feature data sources.

Autodesk MapGuide Enterprise and MapGuide Open Source API Summary


API Language Customization Capabilities

Geospatial Platform API ASP.NET, Working with geospatial feature data, co-
PHP, Ja- ordinate systems, maps, layers, and geo-
va/JSP metric analysis.

Viewer API JavaScript User interaction in the Viewer, communica-


tion with the Web tier.

Studio API C++ Loading and managing data in the site


repository. Available with Autodesk
MapGuide Studio.

Autodesk Topobase API Summary


API Language Customization Capabilities

Client/Framework API .NET Wide range of capabilities including:


■ Database access (full Oracle Spatial
support)
■ Reading and writing Topobase features
■ Job (long transactions) handling
■ Working with feature rules and forms
■ User interface and workspace manage-
ment
■ Interaction with documents,
workspaces, maps, and layers
■ Working with Topobase Administrator
■ Customization of Topobase Client

24 | Chapter 4 Autodesk Geospatial APIs


API Language Customization Capabilities

■ Creation of Vertical Applications and


plug-ins

Server-side API Java, Direct interaction with the Oracle database,


PL/SQL including methods for working with geom-
etry, features, and topology. Much of this
capability is exposed in the Client/Frame-
work API, so the Server-side API is not
usually used for application development.

AutoCAD and AutoCAD OEM API Summary


API Language Customization Capabilities

AutoCAD ObjectARX API C++, .NET Full customization of the AutoCAD environ-
ment, including:
■ Accessing the AutoCAD database
■ Interacting with the AutoCAD editor
■ Creating user interfaces using the Mi-
crosoft Foundation Classes (MFC)
■ Supporting the multiple document in-
terface (MDI)
■ Creating custom classes
■ Building complex applications
■ Interacting with other programming
environments

AutoCAD ActiveX API VB, VBA Basic automation using standard AutoCAD
objects. Can also be integrated with other
applications that use VBA, such as Mi-
crosoft Office.

Overview | 25
API Language Customization Capabilities

AutoCAD AutoLISP API AutoLISP Basic automation using standard AutoCAD


objects.

AutoCAD Raster Design API Summary


API Language Customization Capabilities

ActiveX Interface VBA Importing, managing, and exporting raster


images.

Autodesk Design Review API Summary


API Language Customization Capabilities

Autodesk Design Review .NET, Customizing the tools and commands


API JavaScript available in Autodesk Design Review and
the DWF Viewer.

DWF Toolkit C++ SDK for creating applications to read and


write DWF files. Separate download.

DWF Writer Windows printer driver for creating DWF


files from any Windows application. Dis-
tributed with Autodesk Design Review.

AutoCAD Map 3D APIs


AutoCAD Map 3D includes the following APIs. The APIs are described in more
detail in the following sections.

26 | Chapter 4 Autodesk Geospatial APIs


AutoCAD Map 3D APIs

Map 3D Geospatial APIs (.NET)


The geospatial APIs read, write, and manage GIS data.
Geospatial Platform API
The Geospatial Platform API is a common API shared between Map 3D and the MapGuide products.
It contains classes and methods for dealing with data access, maps and layers, geometry, spatial
operations, and queries.
Map 3D Platform API
The Map 3D Platform API contains classes and methods specific to Map 3D that do not
apply to the MapGuide products. In most cases this is because of the different architectures
of the products. Map 3D is a desktop application and the MapGuide products use a
tiered web architecture. This affects how the products store and access data.

Feature Data Objects (FDO)


FDO is a general-purpose C++ and .NET API for connecting to, reading, and writing geospatial data
from multiple data sources. The Geospatial Platform API contains a simplified wrapper for FDO,
but the full FDO API is available when required.

Map 3D ObjectARX APIs


The Map 3D ObjectARX APIs manage the Map 3D aspects of CAD drawing objects.
ObjectARX .NET API
The Map 3D ObjectARX .NET API is a managed wrapper for the Map 3D ObjectARX C++ API. This
is the recommended API for applications that also use the Geospatial Platform API.
ObjectARX C++ API
The Map 3D ObjectARX C++ API contains classes and methods for adding some GIS capabilities to
drawing objects. This includes things like managing data from multiple files, classifying objects,
annotating, attaching attribute data to objects, and managing layers.

AutoCAD ObjectARX APIs


The AutoCAD ObjectARX APIs manage AutoCAD functionality.
ObjectARX .NET API
The AutoCAD ObjectARX .NET API is a managed wrapper for the AutoCAD ObjectARX C++ API.
ObjectARX C++ API
The AutoCAD ObjectARX C++ API handles all aspects of the AutoCAD environment, including
registering commands, creating custom UIs, and working wirh drawing objects.

Legacy APIs
The legacy APIs provide simple automation, but are not recommended for new application
development.
Map 3D ActiveX API
Map 3D AutoLISP API
AutoCAD ActiveX API
AutoCAD AutoLISP API

New application development should use the .NET APIs wherever possible.
These provide access to the most complete functionality.

AutoCAD Map 3D APIs | 27


Geospatial Platform API

The Geospatial Platform API is typically used to customize AutoCAD Map 3D


to simplify data management workflows and add or modify the capability of
the AutoCAD Map 3D geospatial tools. The Geospatial Platform API for
AutoCAD Map 3D was first available as a preview release with AutoCAD Map
3D 2008, but is now fully integrated into the product. This is a .NET API for
reading, writing, and working with geospatial data. Much of the API is shared
with Autodesk MapGuide Enterprise and MapGuide Open Source, but there
are some extensions specific to the Map 3D Platform API.
Product-specific extensions to the Geospatial Platform API are required by the
diverging architectures of AutoCAD Map 3D and Autodesk MapGuide
Enterprise. AutoCAD Map 3D is a desktop product, and each AutoCAD Map
3D map has its own resource repository stored in the DWG file. The MapGuide
products are Web-based,with a shared repository for the site. The extensions
manage these differences and also provide some standard .NET functionality
across the products, such as event handling.
For AutoCAD Map 3D, the Geospatial Platform API and the Map 3D Platform
API are available as a .NET assembly.
See Geospatial Platform API Concepts on page 30 for more details.
Documentation for the Geospatial Platform API is installed with AutoCAD
Map 3D. The assemblies and other components required to use the API are
included with the AutoCAD Map 3D SDK, which is available from the
Developer Center at www.autodesk.com/developer.

Feature Data Objects

The Feature Data Objects (FDO) Data Access Technology is used internally by
the Geospatial Platform API of AutoCAD Map 3D. FDO uses a provider-based
model for reading and writing geospatial data. AutoCAD Map 3D ships with
FDO providers that can be used with most standard geospatial data formats.
See FDO Data Access Technology on page 36 for details.
FDO is an open source project of the Open Source Geospatial Foundation,
fdo.osgeo.org. In addition to source code and binaries, this site also includes
additional providers.
Documentation for the FDO API is installed with AutoCAD Map 3D. The
assemblies and other components required to use the API are included with
the AutoCAD Map 3D SDK, which is available from the Developer Center at
www.autodesk.com/developer.

28 | Chapter 4 Autodesk Geospatial APIs


AutoCAD ObjectARX APIs

The AutoCAD ObjectARX API is available as a C++ API or a .NET API. The .NET
API is a managed wrapper for the C++ API, offering equivalent functionality.
The AutoCAD Object ARX APIs are included in the AutoCAD SDK, which is
available from the Developer Center at www.autodesk.com/developer.

AutoCAD Map 3D ObjectARX APIs

The AutoCAD Map 3D ObjectARX API is available as a C++ API or a .NET API.
The .NET API is a managed wrapper for the C++ API, offering equivalent
functionality. Note that the organization of the .NET API is somewhat different
from the C++ API, to make it follow the standard .NET model more closely.
The AutoCAD Map 3D Object ARX APIs are included with the AutoCAD Map
3D SDK, which is available from the Developer Center at
www.autodesk.com/developer. They also require the AutoCAD ObjectARX APIs.

NOTE The AutoCAD Map 3D ObjectARX APIs rely on the AutoCAD ObjectARX
APIs for core functionality. Both SDKs, for AutoCAD and for AutoCAD Map 3D,
must be installed in the same folder. The AutoCAD SDK is installed first because
some components of the AutoCAD Map 3D SDK replace versions in the AutoCAD
SDK.

Legacy APIs

The AutoCAD Map 3D ActiveX and AutoLISP APIs cover Autodesk Data
Extension functionality (ADE), which includes drawing sets, queries, and
object data. The AutoCAD Map 3D AutoLISP API also covers map plotting and
topology. These APIs do not include functions for newer AutoCAD Map 3D
features, such as access to geospatial data through FDO. Because of this, they
can be used for some basic automation, but should not be used for new
application development. The legacy APIs are installed with AutoCAD Map
3D. Documentation is available from the Help menu.

Autodesk MapGuide Enterprise and MapGuide


Open Source APIs
The different tiers of a MapGuide installation expose different APIs. See
Autodesk MapGuide Enterprise on page 18 for details about the MapGuide
architecture.

Autodesk MapGuide Enterprise and MapGuide Open Source APIs | 29


All MapGuide APIs are installed with the product. There is no need to install
a separate SDK.

Web API

The Web API is available to applications running on the web tier. It includes
the Geospatial Platform API plus some classes and methods that are specific
to MapGuide. See Geospatial Platform API Concepts on page 30 for more
details about the Platform API.
The Web API is available in ASP .NET, Java/JSP, and PHP.

Viewer API

The Viewer API is a JavaScript API used by the AJAX Viewer and the DWF
Viewer. Nearly all calls are identical between the two Viewers.
The Viewer API contains methods for panning, zooming, digitizing, and other
interaction with the Viewer. It also contains methods for submitting requests
to the Web tier.
Most MapGuide custom applications will use a combination of Web API and
Viewer API calls.

Studio API

The Studio API is a .NET API used by Autodesk MapGuide Studio for loading
data into the site repository. Use this API to automate load procedures for
external data sources.

Feature Data Objects

The Feature Data Objects (FDO) API is used internally by the Geospatial
Platform API in Autodesk MapGuide Enterprise and MapGuide Open Source.
There should be no need for most applications to program directly against
this API.

Geospatial Platform API Concepts


The Geospatial Platform API is a recent addition to the Autodesk geospatial
product line. Originally developed for Autodesk MapGuide Enterprise and
MapGuide Open Source, it has also been added to AutoCAD Map 3D.

30 | Chapter 4 Autodesk Geospatial APIs


Most of the API is shared between the products. Differences in implementation
are usually a result of differences in the underlying architectures of the
products.
Some significant features of the API are:

■ Standardized methods for reading and writing data from different sources,
including SHP, SDF, and Oracle Spatial databases.

■ Flexible methods for defining geometries and geometric objects.

■ Methods for geometric analysis, including common spatial operations like


intersection, union, and difference.

■ Coordinate system geometry, including coordinate system conversion.

■ Supporting classes for events, collections, and similar objects.

For AutoCAD Map 3D, the Geospatial Platform API is available as a .NET API,
and can be called from any .NET language. For MapGuide Enterprise and
MapGuide Open Source, the Geospatial Platform API is available in ASP .NET,
Java/JSP, and PHP. There are minor differences due to the syntaxes of the
languages, but other than that the API is consistent across all languages.
MapGuide has the simplest implementation because it works exclusively with
feature sources managed by FDO. AutoCAD Map 3D is more complex because
it also works with CAD drawing objects.
Resources in the Geospatial Platform API are XML streams that define the
components of a map. Some of the different resource types are:

■ FeatureSource, which contains the necessary information to connect to


and work with an FDO feature source.

■ LayerDefinition, which describes the features in a map layer and how


they should be styled.

■ MapDefinition, which describes the map layout.

Resources are managed by the Resource Service. Working with the resource
service requires reading, writing, and modifying the XML. Other services use
the resources. For example, the Feature Service uses FeatureSource resources
when it connects to FDO data sources.

Geospatial Platform API Concepts | 31


Data Architecture of MapGuide

Mapping Service Rendering

MapDefinition
Stylization
LayerDefinition

Feature Service
FeatureSource
Definition

FDO
Config Files

Resource Service

The implementation for AutoCAD Map 3D is slightly different because it is


built on the AutoCAD platform. In MapGuide, resources are stored in the site
repository. Some resources are available to all MapGuide sessions, while others
are restricted to individual sessions. In AutoCAD Map 3D, resources are stored
internally in the DWG file. This means that resources cannot be shared between
different maps. Each must have its own copy of any resources.
AutoCAD Map 3D uses AutoCAD drawing tools for editing features. The Feature
Service makes the necessary translations between AutoCAD drawing objects
(AcDb entities) and Platform API geospatial features.

32 | Chapter 4 Autodesk Geospatial APIs


Data Architecture of AutoCAD Map 3D

Display manager AutoCAD


(Mapping Service)
Rendering

MapDefinition
Stylization
LayerDefinition

Feature Service Acdb


FeatureSource
Definition
Caching

Config Files
FDO
Resource Service

Autodesk Topobase APIs


Autodesk Topobase stores data in an Oracle Spatial database, which it also
uses to implement workflow, business rules, long transactions (jobs), and
topology. Working in the Microsoft .NET Framework with the Autodesk
Topobase APIs, you can gain access to stored data, extend Autodesk Topobase,
and create custom applications and plug-ins.

Autodesk Topobase APIs | 33


Data Architecture of Autodesk Topobase

Display manager AutoCAD


(Mapping Service)
Rendering

MapDefinition
Stylization
LayerDefinition

Feature Service Acdb


FeatureSource
Definition
Caching

Config Files
FDO
Resource Service

Oracle Spatial

Plug-ins

Plug-ins are client-side extensions to Topobase that enable you to customize


Topobase Client, Topobase Web, and Topobase Administrator to the
requirements of your organization. As .NET class libraries that you can develop
in any .NET language, plug-ins can customize a user interface, manage a
workspace, and control how users interact with documents and workspaces.
When you create a plug-in, you must also create a Topobase Plug-in (TBP) file.
This file is an XML file with a .tbp file name extension that tells Topobase
how to handle your plug-in.

Client API

The Topobase Client API is 100% managed code and provides access to key
components of Topobase. For example, the API enables you to insert, modify,
and delete features, and to work with topics (groups of feature classes) and
domains (sets of values defined for feature attributes).

Data layer

As well as support for standard database transactions, the Topobase API fully
supports Oracle Spatial for managing geospatial objects and data in an Oracle
Database. It reads and writes features (rows) and provides typed access to
feature classes (tables). The long transactions interface includes routines for

34 | Chapter 4 Autodesk Geospatial APIs


job handling and merging. There is also support for working with client-side
feature rules and for creating custom feature rules.

Map layer

For map services and coordinate systems transformations, the map interface
of the Topobase API includes over fifty methods that work as they do in
AutoCAD Map 3D, for client-side operations, and as they do in MapGuide
Enterprise for the Web.

User interface layer

The Topobase Forms API gives you access to Topobase forms and controls.
These are the principal means for editing, viewing, and analyzing Topobase
feature data. Using the API, you can manipulate the location of controls and
elements on the forms to meet your own requirements.

Vertical modules

Several Topobase API components help you develop new Vertical Application
Modules:

■ Structure updates — the API provides basic capabilities for maintaining


data models

■ Workflows

■ Feature rules

Workflows

The Topobase Workflows API enables you to create custom plug-ins that use
workflows to guide users through complex tasks, such as data acquisition,
analysis, and reporting.

Feature rules

Feature rules are methods and triggers for processing data according to
predefined algorithms. The methods and triggers operate when certain events
occur and you can use them to control tasks such as checking data consistency,
correcting data, or to add new capabilities.

Autodesk Topobase APIs | 35


Server-side API

The Topobase server-side API enables you work directly with the Oracle
database using Java and PL/SQL. The API includes Java packages with classes
and methods for data management and for working with geometry, features,
and topology.

FDO Data Access Technology


GIS applications often experience the same challenge: geographic data comes
from a wide range of sources, often incompatible with each other. Converting
data can be a costly and time-consuming process.
Feature Data Objects (FDO) is an API designed to eliminate many of these
problems. It is a general API for working with all kinds of geospatial data. FDO
uses a provider-based model for data access. Each data format requires a
provider, which handles the low-level access requirements of the format. An
application using FDO for its data access can use just the FDO API, without
needing to worry about the details for that particular format.
FDO application development can take two forms:

■ Creating new FDO providers

■ Creating applications that use the FDO API to read and write feature data

Working with data from a new format simply requires using a provider for
that format. There is no need to make any changes to the main application.
The FDO provider model includes support for the following types of data:

■ File-based feature data, such as SHP and SDF

■ File-based raster data, such as JPEG and TIFF

■ Relational databases, such as Oracle Spatial and MS SQL

■ Web services, such as WMS and WFS

The FDO API provides methods for querying the capabilites of a provider, to
determine what kinds of data it handles and what can be done with the data.
FDO is used internally in AutoCAD Map 3D, Autodesk MapGuide Enterprise,
MapGuide Open Source, and Autodesk Topobase for access to geospatial data.
The standard APIs for these products can handle most data access, but the

36 | Chapter 4 Autodesk Geospatial APIs


FDO API is also exposed in some Autodesk products so custom applications
can use it when needed.
FDO is a project of the Open Source Geospatial Foundation, fdo.osgeo.org.
Autodesk products using FDO ship with providers to handle most types of
geospatial data. Other providers are available from the Open Source Geospatial
Foundation.

AutoCAD Raster Design API


AutoCAD Raster Design may be customized through the use of a VBScript
interface that allows access to the core product functionality through a set of
ActiveX components from inside AutoCAD. The scripting interface is invoked
from inside the AutoCAD environment and allows access to functionality that
is defined by a simple object model. The objects that are available to the
scripting interface cover these general areas of functionality:

■ Info—Information about an image in the AutoCAD drawing.

■ Insert—Insertion of images of many different types and formats into an


AutoCAD drawing.

■ List—Retrieving the object id of the image from model space or paper space

■ Write—Saving images in AutoCAD to the same or different formats

Detailed information about the Raster Design ActiveX interface may be found
in the Autodesk Raster Design ActiveX Reference help file that is installed with
the product. The help file contains detailed examples covering nearly every
object and method that is discussed.

Autodesk Design Review API


Customizing user interfaces

The Autodesk Design Review APIs give you programmatic access to many of
the objects that make up the application. You can embed controls in Microsoft
Internet Explorer and Microsoft Office applications, and then use Visual Basic
.NET, Visual C# .NET, and JavaScript to customize the controls.

AutoCAD Raster Design API | 37


Using the Design Review API you can tailor Design Review and DWF Viewer
interfaces to your own requirements. For example, you can hide or show
certain toolbars so that you control the capabilities available to your users.
The Design Review API documentation is available from the Developer Tools
link on the DWF Developers page at www.autodesk.com/dwf-developers.

Autodesk RealDWG API


Software applications that link to RealDWG libraries are called host applications
and do not require the presence of an AutoCAD application, such as AutoCAD
Map 3D, to write DWG and DXF files. Host applications produce DWG and
DXF files that are completely compatible with the DWG and DXF
specifications. Exisiting Autodesk applications that have to work with the
DWG and DXF formats, other than those based on AutoCAD, use RealDWG
technology.
When you build an Autodesk RealDWG host application, your application
provides services for working directly with AutoCAD CAD data files. Your
application can then manipulate the data files either as AutoCAD drawing
(DWG) or drawing exchange format (DXF) files. RealDWG also enables you
to perform file operations and support your custom objects in memory.
To build RealDWG host applications you must be licensed by Autodesk. If
you are working in a .NET environment, you must also follow certain
procedures that implement security for the DWG and DXF formats and that
digitally sign the process assemblies, or executables, that you create. Following
these procedures allows your new host applications to operate predictably.
If you are a C++ developer, your RealDWG host application’s executable (.exe
file) or dynamic link library (.dll file) must link with a special security object
that comes with the RealDWG SDK.

Difference between RealDWG and ObjectARX for AutoCAD

RealDWG contains the DBX components of ObjectARX and allows your


applications to read and write DWG and DXF files. RealDWG does not have
the capability to view or modify the AutoCAD user interface. Unlike
ObjectARX, which always uses AutoCAD as a host application, you can create
your own host applications with RealDWG that do not require AutoCAD on
the same computer.

38 | Chapter 4 Autodesk Geospatial APIs


ObjectARX applications always require AutoCAD as their host application.
RealDWG does not require the presence of AutoCAD software. RealDWG is
used to create host applications, but ObjectARX is not.

Autodesk DWF Toolkit


Building applications

If you want to build applications to work with DWF files, the specification of
Design Web Format files is publically available and the DWF Toolkit includes
C++ samples that demonstrate how to read and write DWF files.
The DWF Toolkit comprises four components that provide cross-platform
(Microsoft Windows, Apple Mac OS, Linux) support, in both 32-bit and 64-bit
environments:

■ DWF Core — provides cross-platform support

■ DWF Toolkit — manages DWF files as packages

■ WHIP Toolkit — manages 2D streams

■ W3D Toolkit — manages 3D streams

Using the DWF Toolkit you can write applications that can perform the
following tasks:

■ Reading and writing 3D DWF files from any application

■ Creating simple 2D interfaces

■ Reading and writing composite DWF files (3D and 2D combined)

The current version of the toolkit handles DWF files generated by AutoCAD
2008 and other Autodesk design software.
The DWF Toolkit is available from www.autodesk.com/dwftoolkit.

Autodesk DWF Toolkit | 39


40
Autodesk Geospatial
Samples 5
Overview
The different geospatial APIs and SDKs all have their own sets of sample
applications. This roadmap does not cover all the samples in detail, but
concentrates on some of the more recent APIs, especially the Geospatial Platform
API in AutoCAD Map 3D, Autodesk MapGuide Enterprise, and MapGuide Open
Source.

AutoCAD Map 3D

AutoCAD Map 3D Geospatial Platform API


The Geospatial Platform API samples for AutoCAD Map 3D are installed with
the AutoCAD Map 3D SDK, in the folder SDK_dir\MapSamples\Platform.
Currently, the samples are available as C# projects for use with Microsoft Visual
Studio 2005. The ReadMe.txt file in each sample folder provides more details
about building and running the sample.

BuildMap

The BuildMap sample demonstrates how to connect to external geospatial data


and use it to create a map in AutoCAD Map 3D. It brings in vector data for land
divisions, point data for traffic signal locations, and a raster image overlay. It

41
also includes a few additional commands for changing how the layers are
displayed.
BuildMap Output

FindIntersects

The FindIntersects sample loads external data representing roads in a city. The
roads are made up of road segments, where each segment is a feature in the
feature class.
FindIntersects is very similar to FindIntersectsMG, which works with Autodesk
MapGuide Enterprise. This is a good example of how the Geospatial Platform
API spans the different products.
Running the FindIntersects command creates another layer in the map, with
points showing where road segments intersect.

42 | Chapter 5 Autodesk Geospatial Samples


FindIntersects Output

GenerateAnnotation

The GenerateAnnotation sample loads point data representing the locations


of traffic signals from an external SDF file. The points in the file have attribute
data, containing fields such as the address and owner of the traffic signal.
Running the GenAnnotation command adds annotation blocks to the points,
containing the attribute fields from the feature class. This sample demonstrates
bringing in feature data in via the Geospatial Platform API, and using it to
create annotations with the ObjectARX .NET API.

AutoCAD Map 3D Geospatial Platform API | 43


GenerateAnnotations Output

InputEditor

The InputEditor sample creates an event handler that is triggered whenever


a new vector feature is added to a map. The event handler displays a data table
that prompts the user for the attribute data required for the new feature. It
reads the list of attributes from the feature source and uses that to generate
the rows in the input table.
InputEditor Data Table

44 | Chapter 5 Autodesk Geospatial Samples


NetworkTrace

The NetworkTrace sample loads data representing a road network. The user
selects a start point and an end point in the network, and the application
traces a path on the network between the two points.
NetworkTrace Output

PolygonOperation

The PolygonOperation sample loads a simple file showing two overlapping


polygons. The user can select the polygons and perform one of the following
geometric comparisons:

■ Difference

■ Union

■ Intersection

■ Subtraction

The same operations can also be applied to multiple polygons.

AutoCAD Map 3D Geospatial Platform API | 45


PolygonOperation Source Polygons

PolygonOperation Difference

46 | Chapter 5 Autodesk Geospatial Samples


PolygonOperation Union

PolygonOperation Intersection

AutoCAD Map 3D Geospatial Platform API | 47


PolygonOperation Subtraction

SpiderNetwork

The SpiderNetwork sample loads data from two separate SDF files. One of the
files contains point data representing the locations of police stations and the
other file contains point data representing the locations of crime scenes. The
feature class for the crime scenes also contains attribute data that identifies
the police station that responded to the crime.
Running the spider network command creates a third layer that contains lines
connecting the crime locations with the responding police stations.
This demonstrates how to combine data from different feature classes.

48 | Chapter 5 Autodesk Geospatial Samples


SpiderNetwork Output

AutoCAD Map 3D ObjectARX APIs


The AutoCAD Map 3D ObjectARX API samples are installed as part of the
AutoCAD Map 3D SDK. The C++ samples are installed in sub-folders of the
folder SDK_dir\MapSamples\Platform. The .NET samples are installed in
sub-folders of the folder SDK_dir\MapSamples\Platform\DotNet. They are
available in VB.NET, C#, and C++ versions.
Documentation for the ObjectARX APIs is available in the AutoCAD Map 3D
ObjectARX C++ Developer’s Guide and the AutoCAD Map 3D ObjectARX .NET
Developer’s Guide. Both guides are installed with AutoCAD Map 3D and with
the AutoCAD Map 3D SDK.
Documentation for the samples is available within each sample folder.

AutoCAD Map 3D ObjectARX APIs | 49


AutoCAD Map 3D ActiveX and VBA APIs
The AutoCAD Map 3D ActiveX samples are installed with AutoCAD Map 3D,
in the folder InstallDir\Sample\ActiveX. Documentation is available in
README files and internally in the VBA files.
The AutoCAD Map 3D VBA samples are installed with AutoCAD Map 3D, in
the folder InstallDir\Sample\VBA. They are documented in the file
MapSampleReadme.txt.

AutoCAD Map 3D AutoLISP API


The AutoCAD AutoLISP API samples are installed with AutoCAD Map 3D, in
the folder InstallDir\Sample. The .lsp files have internal documentation.

Autodesk MapGuide Enterprise


MapGuide Enterprise comes with sample data and sample applications. For
information on how to install them, see the Autodesk MapGuide Enterprise
Installing Sample Data and Sample Applications guide.
There are two types of samples using the standard Viewer UI:

■ simple examples, corresponding to chapters in the Developer’s Guide, which


show how to use different parts of the API

■ more complex examples, showing how a finished application might work

In addition, Autodesk MapGuide Studio, a separate product designed to work


with Autodesk MapGuide Enterprise, includes a set of samples showing how
to load data into the MapGuide site repository using the Studio API.

Developer Guide Samples


Hello Map

This sample shows how to display a map and how to handle simple user
interaction. If the user clicks a link beside the map, the sample retrieves and
displays information about the map.

50 | Chapter 5 Autodesk Geospatial Samples


Hello Viewer

This sample shows different ways of calling MapGuide Viewer API functions.

■ Custom buttons are added to the tool bar, task list, and context menu.
When the user clicks the button, the sample calls the Viewer API’s
ZoomToView() method to reposition the map to a specific location.

■ The sample also shows how to call the same method from links in the task
pane beside the map.

Interacting With Layers

This sample shows how to control a map’s layers through the API.

■ Layer Visibility
This sample shows how to retrieve information about a map’s layers. When
the user clicks a link, it lists the map’s layers and their current visibility
status.

Developer Guide Samples | 51


■ Rename Roads Layer
This shows how to manipulate layers. When the user clicks a link the
sample renames one of the map’s layers.

Working With Feature Data

This example shows how to work with the map’s underlying data.

■ Query Features
Shows how to list particular features, for example all the properties owned
by a specified person.

■ Set Active Selection


Shows how to select certain features, just as if the user had selected them
manually. For example, select all the properties owned by a specified person.

■ List Selected Features


Lists information about the currently selected features.

Modifying Maps and Layers

These examples shows how to manipulate maps and the map’s layers.

■ Change Layers via DOM


Shows how to create a layer by using the Document Object Model. For
example, color code all the buildings build after 1980.

■ Create Square Footage Layer


Shows how to create a new layer with color coding styles (“theming”)
applied to areas. For example, how to create a layer color coding parcels
by square footage.

■ Create Hydro Line Layer


Shows how to create a new layer with theming applied to lines. For example,
how to create a layer showing rivers.

■ Create Points of Interest Layer


Shows how to create a new layer with theming a applied to points. For
example, how to create a layer with marker icons at particular points of
interest.

52 | Chapter 5 Autodesk Geospatial Samples


Analyzing Features

This example show various ways you can analyze the map’s data.

■ Create Buffer
Creates a buffer around a selected parcel. The buffer is drawn on the map
and shows all the parcels within a specified distance from the selected
parcel.

■ Find Features In Buffer


Lists information, such as the name of the property owner, for all the
parcels in the buffer.

Digitizing and Redlining

This example shows how to respond to a user’s input as they click or drag on
the map.

■ Digitizing
Shows how to convert a user’s mouse clicks to map coordinates.

■ Redlining
Shows how to enable the user to draw lines on a map.

Custom Output

This sample shows how to prepare versions of the map ready for printing or
electronic distribution.

■ Property Report
Shows how to create a printable page with an image insert of a selected
property.

■ eMap
Shows how to create and display an eMap, which is a form of DWF that
contains metadata that allows a DWF viewer to connect to the MapGuide
server to display the map. An eMap is a compact format, but it requires
access to the MapGuide map agent via the Internet or a company intranet.

■ ePlot
Shows how to create and display an ePlot, which is designed for offline
viewing and printing. Each map sheet in an ePlot is a complete map image
that can be viewed offline using Autodesk Design Review.

■ Multi Plot

Developer Guide Samples | 53


Shows how to create and display a multi-plot, which is an ePlot with
multiple map sheets.

Viewer Samples
The Viewer samples are more complex than the Developer Guide samples.
They show some techniques for application development using Autodesk
MapGuide Enterprise. Functionally, these three samples are the same, but they
demonstrate different Viewer technology. The samples are:

■ Using DWF Viewer

■ Using Ajax Viewer

■ Using Tiled Ajax Viewer

54 | Chapter 5 Autodesk Geospatial Samples


All three samples show how to:

■ Connect to a MapGuide site and create a session.

■ Query feature data and work with geometry.

■ Change the view of a map from server-side script.

■ Read and manipulate XML based resources.

■ Store temporary resources within a session.

■ Plot a map as an ePlot DWF.

MapGuide Studio API Samples


There are several examples in the Studio API Reference which demonstrate how
to load data into MapGuide from different file formats. See:

■ DwfLoadProcedure Class

■ DwgComponent.Children Property

■ DwgLoadProcedure Class

■ RasterLoadProcedure Class

■ SdfLoadProcedure Class

■ ShpLoadProcedure Class

Other MapGuide Samples


The MapGuide Open Source site at mapguide.osgeo.org has links to other
MapGuide sites, showing some of the wide range of possible applications.
Many of these external sites also have links to the source code.

Autodesk Topobase
The Topobase Developer's Guide describes the purpose and the operation of
over 75 samples. The samples are available in both the C# and VB.NET

MapGuide Studio API Samples | 55


languages and show you various aspects of the Topobase API including how
to perform the following tasks:

■ Creating users

■ Connecting to and communicating with the database

■ Customizing the user interface

■ Creating workflows

To work with the Topobase API samples in Microsoft Visual Studio, open the
solution files in either the Development\Samples\CSharp directory or in the
Development\Samples\VB.Net directory of the Topobase Client installation.

Autodesk RealDWG 2008


Autodesk RealDWG 2008 comes with the following samples that illustrate the
basic framework for various types of applications:

■ creatent shows how to build a simple console application that creates an


AcDbDatabase, adds an entity to it, and writes it to a DWG file

■ dumpdwg is a console application that reads DWG files and reports


information on their contents

■ dotnet/dumpdwg shows how to create a VB .NET host application with


the same capabilities as the C++ dumpdwg sample application

■ polysamp demonstrates how to create a custom object enabler and wrap


it in an ActiveX Automation wrapper

Autodesk Design Review


The Autodesk Design Review API reference documentation contains sample code
fragments that illustrate how to work with embedded controls and objects.
From the DWF sample code gallery , you can download sample code, in C#
.NET, VB.NET, and JavaScript, developed by Autodesk partners that
demonstrates how to work with embedded controls. The gallery also includes
samples

56 | Chapter 5 Autodesk Geospatial Samples


Index
A APIs 29
architecture 18
AcDb entities, in AutoCAD Map 3D 32 client tier 20
AJAX Viewer 20 DWF Viewer 20
annotation 4 Viewer API 30
APIs 23 Web API 19, 30
application programming interfaces, see Autodesk MapGuide Studio 5, 20, 30
APIs Studio API 30
asset management 5 Autodesk RealDWG 3, 8, 38
attached DWG files 15 API 38
attributes, of a feature 12 Autodesk Topobase 2, 5, 20–21, 33–36
AutoCAD 3, 11, 29 API components 21
drawing objects 11 APIs 33
ObjectARX APIs 29 architecture 20
SDK 29 client API 34
AutoCAD entities 11 data layer 34
AutoCAD Map 3D 2, 4, 17–18, 26, 28– feature rules 35
29, 32 map layer 35
ActiveX API 29 plug-ins 34
APIs 26 server-side API 36
architecture 17 support for Oracle Spatial 34
AutoLISP API 29 user interface layer 35
drawing tools 32 vertical modules 35
extensions to AutoCAD 18 workflows API 35
FDO API 28
Geospatial Platform API 28
Map 3D Platform API 28
C
ObjectARX APIs 29 CAD data 15
Resource Service 32 CAD layers 11
SDK 28–29 client API, in Autodesk Topobase 34
AutoCAD OEM 3 client tier, in Autodesk MapGuide
AutoCAD Raster Design 3, 6, 22, 37 Enterprise 20
API 37 collaboration, with drawing files 7
architecture 22 coordinate systems 31
Autodesk Design Review 3, 7, 14, 22, 37 customization options 23
API 37
architecture 22
Autodesk DWF Toolkit 3, 9, 39 D
API 39
Autodesk MapGuide Enterprise 2, 4, 18– data layer, in Autodesk Topobase 34
20, 29–30 data sources 14
AJAX Viewer 20 data types, for FDO 36

Index | 57
DEM 13 geometry, API for 31
Design Review 3 georeferencing 13
Design Web Format (DWF) 7 geospatial data, in AutoCAD Map 3D 18
digital elevation models (DEM) 7 Geospatial Platform API 28, 30–31
drawing files, marking up 7 AutoCAD Map 3D 28
drawing objects 11 Resource Service 31
drawing objects, in AutoCAD Map 3D 4 GIF 15
drawing tools, in AutoCAD Map 3D 32 GIS feature data 12
DWF files, creating from DWG files 7
DWF files, reading and writing 9, 39
DWF Toolkit 3
I
DWF Viewer 20, 38 infrastructure design 5
DWF, description 14 Internet Explorer, embedding Autodesk
DWG files 7, 11, 15 Design Review 37
attached 15 Internet mapping 5
multiple 15
DWG files, in AutoCAD Map 3D 4
DWG files, reading and writing 8, 38 J
DWG objects 11
DWG TrueView 7 JPEG 15
DXF files 7
DXF files, reading and writing 8, 38 L
LayerDefinition resource type 31
E layers, in AutoCAD Map 3D 18
entities, AutoCAD 11
M
F Map 3D 2
FDO 2, 28, 36 map layer, in Autodesk Topobase 35
API 28, 36 MapDefinition resource type 31
data types 36 MapGuide Enterprise 2
providers 28, 36 MapGuide Open Source 2, 4, 18, 29
FDO, in AutoCAD Map 3D 4 APIs 29
feature class 12 architecture 18
Feature Data Objects, see FDO MapGuide Studio, see Autodesk MapGuide
feature rules, in Autodesk Topobase 35 Studio
feature, definition 12 MapGuide Web Studio 20
FeatureSource resource type 31 maps, in AutoCAD Map 3D 18
file-based data 15 Microsoft Internet Explorer, embedding
Autodesk Design Review 37
Microsoft Office, embedding Autodesk
G Design Review 37
multiple DWG files 15
geographic information system, see GIS
geometric analysis, API for 31

58 | Index
O scanned paper drawings 7
SDF files 15, 31
object classification 4 server-side API, in Autodesk Topobase 36
ObjectARX 8 SHP files 31
ObjectARX, differences with site server, in Autodesk MapGuide
RealDWG 38 Enterprise 19
ObjectDBX 8 spatial data format, see SDF files
objects 11 spatial databases 15
Open Source Geospatial Foundation 5, Studio, see Autodesk MapGuide Studio
28, 37 style, for displaying GIS data 12
Oracle Spatial 15, 31 styling, in AutoCAD Map 3D 18
Oracle Spatial database, in Autodesk
Topobase 20
Oracle Spatial, in Autodesk Topobase 34
T
theming 12
P TIFF 15
Topobase 2
paper drawings, scanned 7 Topobase Administrator 6
plug-ins, in Autodesk Topobase 34 Topobase Client 6
PNG 15 Topobase modules 6
properties, of a feature 12 Topobase Web 6
providers, FDO 28
providers, for FDO 36
U
R user interface layer, in Autodesk
Topobase 35
raster data 15
raster data, analysis and conversion 7
raster data, in GIS applications 13
V
Raster Design 3 vertical modules, in Autodesk
raster images 7 Topobase 35
RealDWG 3, 38
differences with ObjectARX 38
licensing 38 W
relational databases 15
Resource Service 32 Web API, in Autodesk MapGuide
in AutoCAD Map 3D 32 Enterprise 19
Resource Service, in Geospatial Platform Web Feature Service (WFS) 16
API 31 Web Map Service (WMS) 16
web services 16
web tier, in Autodesk MapGuide
S Enterprise 19
workflows API, in Autodesk Topobase 35
satellite data 7

Index | 59
60

You might also like