Establishing a Geospatial Environmentdrh2.img.digitalriver.com/DRHM/Storefront/Company/adsk/...2...

40
1 Chapter 1 Establishing a Geospatial EnvironmentChapter1: The lessons in this chapter describe working with the SDF format, and feature sources such as raster and ODBC points. Feature sources can be both raster and vector. Raster feature sources can be images such as air photographs or digital elevation models (DEMs). Vector data includes formats such as SDF, SHP, and Oracle Spatial. Using feature sources in your drawing is a powerful way to display and utilize GIS data without the need for importing or exporting external formats. Objectives After completing this chapter, you will be able to: Connect to a feature source. Work with point data. Use Geospatial Coordinate Systems. Use the Attribute and Spatial filters to limit geospatial data that appears in the map. Sample Chapter Autodesk® Intellectual Property Not Valid for Sale or Resale

Transcript of Establishing a Geospatial Environmentdrh2.img.digitalriver.com/DRHM/Storefront/Company/adsk/...2...

1

Chapter

1

Establishing a GeospatialEnvironmentChapter 1:

The lessons in this chapter describe working with the SDF format, and feature sources such as raster and ODBC points.

Feature sources can be both raster and vector. Raster feature sources can be images such as air photographs or digital elevation models (DEMs). Vector data includes formats such as SDF, SHP, and Oracle Spatial. Using feature sources in your drawing is a powerful way to display and utilize GIS data without the need for importing or exporting external formats.

Objectives

After completing this chapter, you will be able to:

■ Connect to a feature source.■ Work with point data.■ Use Geospatial Coordinate Systems.■ Use the Attribute and Spatial filters to limit geospatial data that appears in the map.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

2 ■ Chapter 1: Establishing a Geospatial Environment

Lesson: Connecting to a Feature Source

Overview

This lesson explains the use and definition of a feature source in Map 3D. You learn how this new method of connecting to data with feature sources is vastly superior to attaching drawings or using Link Templates to retrieve data.

Objectives

After completing this lesson, you will be able to:

■ Describe what a feature source is.■ Decide when to use feature sources.■ Explain the process of connecting to a feature source.■ Connect to a feature source.■ Connect to a raster feature source.

Available feature sources

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Connecting to a Feature Source ■ 3

About Feature Sources

A feature source is any source of spatial data that has been connected by means of feature data objects (FDOs). An FDO enables you to connect directly to SDF and raster data and databases that contain spatial data. No import or export is necessary to use the spatial data that resides in the original feature source.

Feature sources render features on the screen very rapidly. You can create maps far more efficiently by moving your drawing into a feature source, such as SDF.

The three main types of feature sources are:

■ File-based raster and vector.■ Database vector and ODBC.■ OpenGIS raster and vector.

Definition of Feature Sources

A feature source connects to a geographic datastore of GIS features using an FDO provider, enabling you to query, edit, add, delete, and thematically render those features within the Display Manager. Each feature source can be a connection to either file-based or database datastores.

A feature source is similar to a data source. A feature source connects to geographic features (i.e., parcel polygons and attributes) but a data source connects only to attribute data (i.e., parcel ownership and zoning).

File-Based Feature Sources

For file-based feature sources, you can use SHP and SDF for vector information. Many file-based raster feature sources are available, including ECW, MR SID, TIFF, and JPEG. Another type of file-based feature source is the digital elevation model (DEM).

FDO Providers

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

4 ■ Chapter 1: Establishing a Geospatial Environment

Database Feature Sources

The two types of database feature sources are:

■ Points only from X, Y, and Z columns.■ Vectors: Points, lines, and polygons.

The point type of feature source can be provided by the ODBC feature source.

Oracle Spatial, ArcSDE, and, now, SQL Server and MySQL provide a full-vector feature source containing points, lines, and polygons.

OpenGIS Feature Sources

OpenGIS feature sources include the Web Map Service (WMS), a raster-based feature source that returns images, such as PNG, as data. The Web Feature Service (WFS) returns full-vector feature sources from external sites. These OpenGIS feature sources require a URL to find the server (such as Autodesk® MapGuide® Enterprise) that provides the WFS or WMS.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Connecting to a Feature Source ■ 5

Examples of Feature Source Uses

Feature sources can be used to connect to contour lines stored within an SDF file.

A number of image types, such as MR SID, can be placed on a layer in Display Manager.

Digital elevation models, such as a DEM from the USGS, can be connected.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

6 ■ Chapter 1: Establishing a Geospatial Environment

When to Use a Feature Source

You can use feature sources with DWG™ format to provide a hybrid environment of DWG layers and feature sources. For example, a road network may be stored in SQL Server while the sidewalk edges are stored in DWG format. You can then combine both layers of information to produce a map.

Guidelines for Connection to Feature Sources

The following guidelines can help you in choosing to utilize feature sources.

■ Data Sharing

A feature source is a file or database that stores your graphical data with the attribute data. In DWG files, attributes are usually connected to graphics with link templates, object data, or block attributes. If you need to share this information constantly with others outside of your immediate department, you may want to convert your data into a feature source, such as SDF or SHP. File-based feature sources can be transferred easily and maintained within the Map environment without being converted back into DWG.

■ High Performance

Some DWG files can become very large and tax your operating system. Traditionally, the only way to access such a large DWG was to query to pull a subset of the data. Feature sources increase performance by an order of magnitude. You can move to a file-based geodatabase, such as an SDF file, to increase performance.

■ Central GIS Connectivity

If you use GIS databases such as Oracle Spatial or ArcSDE, you can use feature sources in Map to maintain the data. You can use Autodesk FDO providers to connect directly with many GIS databases without translating or batch converting data from one format to another.

■ SQL Server Spatial Support

If you currently use DWG to store graphical information and either Object Data or SQL Server to store attribute data, you can move to a central GIS repository using feature sources. The FDO provider for SQL Server enables you to store all the graphics within SQL Server as graphical entities. In this way, you can store GIS data in SQL Server.

■ Cartographic Tools

Using feature sources, you can stylize data based on its attributes. Theming, hatching, coloring, and symbology are easier using feature sources than AutoCAD® layers and linestyles. The cartographic tools available to data drawn from a feature source are far superior to those used for stylizing DWG objects.

■ Rapid Publishing To Autodesk MapGuide Enterprise

You use a wizard to migrate data stored in feature sources to MapGuide Enterprise. All stylization that was done to your features will migrate also. In contrast, for maps that remain in DWG format, stylization can only be maintained if the files are imported into MapGuide Enterprise as DWF™ format, thus forgoing any advanced attribute features such as dynamic tooltips, labeling, or theming of the layers.

■ OpenGIS Conformity

Web Feature Services (WFS) and Web Mapping Services (WMS) can be added to your map as feature sources. WFS, a vector-based feature source, can be updated. WMS is raster-based and read-only.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Connecting to a Feature Source ■ 7

About Feature Layers

Connecting to feature sources is the first part in displaying geospatial data in a map. Once the feature sources are connected, you can then add the layer to the map.

Definition of Feature Layers

A feature layer is a layer in Display Manager containing features from a feature source such as SDF, SHP, Oracle, or Raster. A feature source may contain many types of feature data. Each can be added as a layer to the map. If the feature source is connected, but not added to the map, it can be seen in the Map Explorer but not in the Display Manager. Once the layer is added to the map, it can then be stylized.

Two Feature Layers of a Feature Connection Added to a Map

SDF_WATER Feature Source Connected without a Feature Layer

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

8 ■ Chapter 1: Establishing a Geospatial Environment

A feature layer is similar to a query of an attached drawing in Map Explorer. The feature source is similar to the attached drawing and the feature layer is similar to the query of that attached drawing.

Example of a Feature Layer

A good example of a feature layer is a Sewer Main layer that is drawn from a UTILITIES.SDF file. The SDF file contains the Sewer Main, Sewer Valves, and Sewer Holes, but only the Sewer Main is drawn as a feature layer.

Process of Connecting to a Feature Source

Feature Source Types

The process of connecting to a feature source varies according to its type. The five types of feature sources are:

■ File-based vector■ File-based raster■ Database■ OpenGIS vector (WFS)■ OpenGIS raster (WMS)

Process: Connecting to a Feature Source

If you remove a feature layer from the Display Manager, the feature source is still connected.

1. To use a database feature source, ensure that the client for that FDO data provider is installed.

For example, to connect to an ODBC database, create the ODBC connection in the Control Panel.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Connecting to a Feature Source ■ 9

2. To add data, choose either feature source or drawing object. Having chosen feature source as the layer, then choose the type of feature source to be added to the map.

Choosing a file-based feature source prompts a request to browse to that file. Otherwise, enter the configuration of the database.

3. Choose the FDO provider type:

■ File-based, such as SDF, SHP, or Raster.■ Database, such as Oracle, SQL Server, MySQL, ArcSDE, or ODBC.■ Web-based, such as WFS or WMS OpenGIS.

4. Depending on the feature source, either set the file name or set the server name or connection to the datastore.

Select the coordinate system that the data is currently in.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

10 ■ Chapter 1: Establishing a Geospatial Environment

5. Once the feature source is added, it will be visible in the Display Manager and Map Explorer.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Connecting to a Feature Source ■ 11

Exercise: Connect to a Feature Source

In this exercise, you create two new SDF based layers in Display Manager. You also create a new SHP based layer and view its associated data in the Data Table dialog box.

The completed exercise

1. Open ...\Connecting to a Feature Source\Redding.dwg.

2. Verify that the Menu/Toolbar Layout is set to Map 3D for Geospatial.

3. Verify that Display Manager is selected in the Task Pane.

4. Click Data > Connect to Data.

5. In the Data Connect dialog box, click Add SDF Connection.

■ For Connection Name, enter SDF_PARCEL.

■ For Source File, browse to Connecting to a Feature Source\Parcels.sdf.

■ Click Open.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

12 ■ Chapter 1: Establishing a Geospatial Environment

6. Click Connect.

7. In the Add Data to Map area, select the Parcels. Note that the coordinate system is CA-I.

8. Click Add to Map. Close the Data Connect window.

Parcels appear in the map and as a layer in Display Manager.

9. Click Data > Connect to Data.

10. In the Data Connect dialog box, click Add SDF Connection.

■ For Connection Name, enter SDF_ROADS.■ For Source File, browse to Connecting to a

Feature Source\Roads.sdf.■ Click Open.■ Click Connect.

11. In the Add Data to Map dialog box, for Add Data to Map, select the Roads.

■ Click Add to Map.

12. With the Data Connect dialog box still open, select Add SHP Connection.

■ For Connection Name, enter SHP_WATERLINES.

■ For Source File, browse to Connecting to a Feature Source\waterlines.shp.

■ Click Open.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Connecting to a Feature Source ■ 13

13. Click Connect.

14. In the Add Data to Map area, select the Waterlines.

■ Click Add to Map.

15. Close the Data Connect window.

16. In the Display Manager, select the waterlines layer.

17. Click the Table button.

18. In the Data Table dialog box, select any record.

The map zooms and selects the objects selected in the Data Table.

19. Save the drawing.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

14 ■ Chapter 1: Establishing a Geospatial Environment

Exercise: Connect to a Raster Feature Source

In this exercise, you create a new layer in Display Manager using four MR SID files as a feature source for a single layer. You change the display order of the raster layer.

The completed exercise

1. Open ...\Connecting to a Feature Source\Redding.dwg you created in the previous exercise if not already open.

2. Verify that Display Manager is selected in the Task Pane.

3. Click Data > Connect to Data.

4. In the Data Connect dialog box, click Add Raster Image or Surface Connection.

■ For Connection Name, enter Raster_SID.■ For Source Folder, click the Folder button

and browse to the Connecting to a Feature Source folder.

■ Click OK.

5. Click Connect.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Connecting to a Feature Source ■ 15

6. In the Add Data to Map area, select the p-05.sid, p-07.sid, s-05.sid, and s-07.sid files.

■ Check Combine Into One Layer.■ For the Layer name, enter RASTER.

7. Click Add to Map.

■ Close the Data Connect window.

Images appear in the map and as a layer in Display Manager.

8. In the Display Manager, click Groups.

9. Click Draw Order.

10. Drag the Raster layer below the Parcels layer.

11. Save your drawing.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

16 ■ Chapter 1: Establishing a Geospatial Environment

Lesson: Working with Point Data

Overview

In this lesson, you learn about point data and how to use it. Point data is derived from ODBC and is an effective way to display points stored in a database.

Objectives

After completing this lesson, you will be able to:

■ Explain what ODBC point data is.■ Describe how ODBC point data can be used.■ Attach and stylize an ODBC point source.

ODBC points display

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Working with Point Data ■ 17

About Point Data

The ODBC provider connects to databases that contain points. An ODBC database typically specifies points either by latitude and longitude columns or by any coordinate system applied to X and Y coordinates. The Z value can be expressed in any units as well.

Definition of ODBC Point Data

ODBC point data is used to place symbols or points on a map. Each point usually has X and Y coordinates defined in a Cartesian grid. Sometimes, the Z value (elevation) is also stored. Following are some further definitions for ODBC point sources:

■ Coordinate System

X, Y, and Z point data are usually assigned a coordinate system, such as UTM or State Plane. When the points are brought in from ODBC, you can apply a different system to project the point data as a data source.

■ Styles

Although X, Y, and Z values can be shown on a map when connected, ODBC databases do not store feature styles. You can define features when you configure a data source.

Example of Microsoft Access point data Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

18 ■ Chapter 1: Establishing a Geospatial Environment

■ Application Programming Interface (API)

The Feature Data Objects (FDO) API provides access to data in a data store. A provider is a specific implementation of the API, such as the FDO provider for ODBC that allows access to an ODBC-based data store.

Example of ODBC Sources

Points collected on a GPS are a good example of point data. They may be collected in UTM and have elevations recorded as well. Many GPS software applications move points from the GPS into a database, such as Microsoft Access. Using an FDO provider for ODBC, these points can be shown in the Display Manager.

ODBC Connection as feature source

GPS Waypoints from ODBC Connection

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Working with Point Data ■ 19

Guidelines for Point Data

Introduction to How Points from ODBC Can Be Used

If you capture physical assets in the field using a global positioning system (GPS), store the ODBC point data in a database as X, Y, and Z columns.

X, Y, and Z coordinates are kept up-to-date on a real-time basis by some applications. Each time features are refreshed, the latest locations are reflected. For example, if you store the real-time location of buses within a city in a Microsoft Access database, you can point your map to the database to view those bus locations.

Guidelines for Using ODBC Point Data

The following guidelines help ensure that your ODBC points can be optimally viewed and managed:

■ Coordinate Systems

Although you can assign point data from ODBC to another coordinate system, performance is increased if the data is collected in the same coordinate system as your map. For example, if your map is currently in California State Plane Zone 1 South, Feet, your point data is rendered faster if it is collected and stored in that same coordinate system.

■ Formats

Using ODBC points ensures that points are generic and accessible to all systems. Although points can be stored in other formats (such as SDF, SHP, Oracle, ArcSDE, and so on) and are accessible by FDO providers, those point types are proprietary and exist in the data stores.

■ Indexing

Place an index in the database from which you retrieve ODBC points. Doing so increases performance when points are used for any application.

ODBC points showing bus locations

Even with database indexing, ODBC points will not perform as well as other FDO feature sources because the indexing is strictly nonspatial within the ODBC database.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

20 ■ Chapter 1: Establishing a Geospatial Environment

Example of Using ODBC Points

A good example of ODBC point utilization is a municipal inventory of assets in the field, such as park benches. Over time, park benches wear out, get damaged, or are stolen and a city must go into the field and perform an inventory of them. With the aid of a GPS unit, this can be done rapidly.

The X and Y coordinates of all the park benches can be stored in Microsoft SQL Server on the network. An ODBC connection to that database allows users to attach that ODBC feature source for an updated layer of the city’s park benches.

Park benches from ODBC Microsoft SQL Server point data

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Working with Point Data ■ 21

Exercise: Attach and Stylize an ODBC Point Source

In this exercise, you create an ODBC connection to a Microsoft Access database. You use this connection to create an ODBC feature source that will generate a hydrants layer from X and Y columns in that database.

The completed exercise

1. In Microsoft Windows, click Start > Run.

2. For Open, enter odbcad32.

■ Click OK.

3. In the ODBC Data Source Administrator dialog box, click System DSN.

.

4. Click the Add button.

5. In the Create New Data Source dialog box, under Name, select Microsoft Access Driver (*.mdb).

■ Click Finish.

6. In the ODBC Microsoft Access Setup dialog box, for Data Source Name, enter REDDING_ODBC.

■ Click Select.

7. Browse to ...\Working with Point Data\ and select REDDING_HYDRANTS.mdb.

8. Click OK.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

22 ■ Chapter 1: Establishing a Geospatial Environment

9. Click OK to complete the ODBC setup.

■ To close the ODBC Data Source Administrator dialog box, click OK.

The REDDING_ODBC data source is now set up for all users on your computer. You will use that ODBC database to create a new layer.

10. In Working with Point Data, open Redding.dwg.

11. In Display Manager, click Data > Connect to Data.

12. In the Data Connect dialog box, for Data Connections by Provider, select Add ODBC Connection.

13. Under Add a New Connection:

■ For Connection Name, enter ODBC_HYDRANTS.

■ For Source Type, select Data Source Name (DSN) from the drop-down list.

■ For Source, browse to REDDING_ODBC.

14. Click Connect.

15. In the User Name & Password dialog box, click Login.

16. In Add Data to Map:

■ Click the Edit Coordinate Systems tab.■ Highlight the Default spatial context.■ Click Edit.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Working with Point Data ■ 23

17. For Coordinate System, select LL : No Datum, Latitude-Longitude; Degrees -180 to +180.

■ Click OK.

18. In the Edit Spatial Contexts dialog box, click OK.

■ Select the Hydrants check box.■ For X, select LON.■ For Y, select LAT.■ For Z, select <none>.

19. Click Add to Map.

20. Close the Feature Connect dialog box.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

24 ■ Chapter 1: Establishing a Geospatial Environment

Lesson: Using Coordinate Systems

Overview

In this lesson, you explore how geospatial data connected to a map can be assigned a coordinate system and how the current map enables the reprojection of the attached geospatial data. Since geospatial feature data can be set to any number of coordinate systems, you learn how to manage the global coordinate system that all the connected feature sources will conform to. Within this lesson, you learn that both raster feature sources, such as air photographs, and vector feature sources, such as SDF files, will dynamically reproject within your drawing file.

Objectives

After completing this lesson, you will be able to:

■ Describe the concept of coordinate systems with geospatial data.■ Explain how to override and assign geospatial coordinate systems.■ Dynamically reproject vector and raster data.

The Assign Global Coordinate System dialog box Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Using Coordinate Systems ■ 25

About Geospatial Coordinate Systems

The current DWG is used as the base coordinate system for any new features being added to the map. Any new Geospatial data will dynamically re-project to match the DWG current coordinate system. This allows for multiple coordinate systems from multiple sources to be accommodated in a single map.

Importance must be put on assigning the correct coordinate system to the map and to the geospatial data. Usually, the geospatial data already has a coordinate system assigned but in the cases where the coordinate system may be not assigned in the file, you can set the coordinate system to the geospatial data.

Assigning coordinate systems to geospatial data is similar to assigning coordinate systems to source DWGs. Unlike DWGs that require the source objects to be requeried into a project drawing, geospatial data is dynamically reprojected in the map.

Example of Assigning Geospatial Coordinate Systems

You will often need to assign the coordinate system during the connection to a SHP file; otherwise, the data may appear in an incorrect location. For example, a ROADS.SHP file and its associated ROADS.SHX and ROADS.DBF files are available, but not ROADS.PRJ. You will have to assign the coordinate system manually to the SHP file when connecting.

SDF and Map with Different Coordinate Systems seen in Data Connect Dialog Box Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

26 ■ Chapter 1: Establishing a Geospatial Environment

Override Coordinate System Process

Sometimes the Geospatial data may have an incorrect coordinate system assigned or the coordinate system does not completely match the names of the coordinate systems in Map 3D. You can override the coordinate system when connecting to the geospatial data in these cases. The coordinate system can be overridden for any Geospatial data including Raster, SDF or WFS.

Process: Override Coordinate System

The following steps demonstrate how to override the coordinate system when connecting to geospatial data.

Edit Spatial Contexts dialog box

Oracle Spatial Coordinate System Override

With Oracle Spatial, the coordinate systems are assigned by Spatial Reference ID (SRID). UTM Zone 10, NAD 83, Meters, for example, is recorded in Oracle as SRID 82212. You may wish to override the coordinate system in Map 3D to UTM83-10 to ensure the correct coordinate system is assigned.

1. Connect to geospatial data.

2. Edit the coordinate system during connection.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Using Coordinate Systems ■ 27

Guidelines for Coordinate System Overrides

Changing a coordinate system to one different from that assigned can be problematic and may have unexpected results. To avoid problems:

■ Ensure that the coordinate system is correct. Follow up with the creators of the data.■ Research the coordinate system that is assigned to the geospatial data. You may find that a

number of coordinate systems within Map 3D match.■ Ensure that you assign the coordinate system of the current map (dwg) before connecting to

geospatial data.■ Create a new coordinate system if none match the existing one in the geospatial file. Do not assign

an incorrect coordinate system.

3. Choose Coordinate System Override.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

28 ■ Chapter 1: Establishing a Geospatial Environment

Exercise: Reproject Geospatial Data

In this exercise, you add a roads layer and a raster layer (that are both in California State Plane coordinate system) into a map that is in UTM 83 coordinate system. You then reproject the data into a latitude and longitude coordinate system dynamically.

The completed exercise

1. Open ...\Using Coordinate Systems\Redding.dwg.

2. Click Setup menu > Assign Global Coordinate System.

Note that the current coordinate system is UTM83-10.

3. In the Assign Global Coordinate System dialog box, click OK.

4. In Display Manager, click Data > Connect to Data.

5. Under Data Connection By Provider, click Add SDF Connection.

■ For Connection Name, enter: SDF_ROADS.

■ For source file, click Browse.

6. In the Open dialog box, browse to ...\Using Coordinate Systems\.

■ Click Roads.sdf.■ Click Open.

7. Click Connect.

8. Under Schema, check Roads.

■ Note that the coordinate system is CA-I.■ Click Add to Map.

9. In the Data Connect dialog box, click Add Raster Image or Surface Connection.

■ For Connection Name, enter Raster_AirPhoto.

■ For Source file for folder, click Browse.

10. In the Open dialog box, browse to ...\Using Coordinate Systems\.

■ Select AirPhoto.sid.■ Click Open.

11. Click Connect.

12. Under Schema, check AirPhoto.sid.

13. Click Edit Coordinate Systems.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Using Coordinate Systems ■ 29

14. In the Edit Spatial Contexts dialog box, click Edit.

15. In the Select Coordinate System dialog box, in the Code text box, for Category, click USA, California.

■ Under Coordinate Systems in Category, click CA-I.

■ Click OK.

16. In the Edit Spatial Contexts dialog box, click OK.

17. In the Data Connect dialog box, click Add to Map.

18. Close the Data Connect dialog box.

The Roads and AirPhoto layers are now reprojected from CA-I into UTM83-10.

19. Click Setup menu > Assign Global Coordinate System.

20. In the Assign Global Coordinate System dialog box, for Code, enter: LL. Click OK.

21. Notice that the coordinates at the bottom of the window are now in latitude and longitude and the Roads and AirPhoto layers are dynamically reprojected.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

30 ■ Chapter 1: Establishing a Geospatial Environment

Lesson: Query Features on Connect

Overview

In this lesson, you use the query on connect method to filter geospatial data that is queried into your map. By filtering geospatial data prior to viewing information in a map, you can increase performance, answer questions, or limit information prior to export. You use the Add to Map with Query and the Query to Filter Data tools to filter geospatial data when connecting.

Objectives

After completing this lesson, you will be able to:

■ Describe the concept of attribute and spatial filtering the feature source with a query.■ Explain the uses and reasons for filtering spatial and attribute data.■ Query using an attribute filter.■ Query using a spatial filter.

Using Query to Add Geospatial Features to a Map

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Query Features on Connect ■ 31

About Filtering Feature Sources

You can filter geospatial feature sources in two distinct ways. The first is an attribute-based query by which you can filter the spatial data that appears on your map. Alternatively, you can filter data spatially by locating a region on a map in order to crop the data when it is rendered on your map.

As you connect to geospatial feature sources, you can filter the data visible in a map by creating a query. These queries can show a subset of the data in the original feature source. The Create Query dialog box is used to create filter statements that can be a combination of conditions using the available functions. Logical operators, such as AND, OR, and NOT can be used to string multiple conditions together.

Attribute Filtering

Within each vector-based geospatial feature, there are a set of attributes or properties that can be used to create a series of conditions in order to filter the features that appear in your map. The properties, regardless of type, such as string, numeric or date types, can be used to filter the features you wish to see. Within the Create Query window, you have a series of operators and functions that you can use to create very complex queries.

Filtering a Parcel Feature Source with the Create Query Dialog Box

Filtering Feature Data Based on Attributes

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

32 ■ Chapter 1: Establishing a Geospatial Environment

Using a query to filter attribute data of features is similar to using Define Query of Attached Drawing(s). The attribute data of a source drawing consists of object data and link template information whereas feature sources include their own attribute data.

Spatial Filtering

You spatially filter a feature source layer so that only some of the features appear in your map. To spatially filter the layer, define a query condition or a set of conditions that specify which features you want.

Within the Create Query or Modify Query dialog box, the Locate On Map enables you to filter features that are within a polygon, rectangle or circle. These polygonal objects can be drawn dynamically or already exist in the map.

Also within the Locate On Map tool, you may choose to spatially filter based on touching any part of a circle, fence, point, polygon or rectangle. Again, you can choose to draw these linear features on the map or choose preexisting objects.

These spatial filters can be combined into a number of conditions.

Example of a Spatial Filter for a Feature Source

A local utility stores all the parcels for nine counties in Oracle Spatial. In order to view the parcels and water mains that fall within the city limits, a spatial filter can be used to choose the city limit polygon and query those features that fall within it.

You can modify or create a new query by right-clicking the Feature layer in Display Manager and choosing Query to Filter Data.

Inside Circle Spatial Query

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Query Features on Connect ■ 33

When to Use Filtering with Feature Sources

The following guidelines will describe when and how to use the spatial and attribute filters for feature sources:

■ Large feature sources should be filtered to increase performance. ■ Multiple feature sources can be filtered simultaneously spatially but not based on attribute. For

example, a folder of SHP files can be queried based on location using the common filter.■ Smaller feature sources such as city limits should be connected to your map before you filter other

data so you can have a reference in which to base your spatial filters on.■ Wildcards (%) should be used with caution when applied to your attribute filters as you may query

a large amount of data.■ Extremely complex filters, especially when combining attribute and spatial conditions, may take

longer time to process.■ Spatial and Attribute Filters do not function with raster feature sources.■ Sub-sets of Feature Sources can be exported to SDF using filters. For example, a watermains

stored in Oracle Spatial can be filtered by “Abandoned” and save as SDF using Export Layer Data to SDF.

Although you can filter a feature source after the features are connected, it is always recommended that you filter during the Data Connect process. This increases map performance because you limit the amount of data prior to viewing it in the map.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

34 ■ Chapter 1: Establishing a Geospatial Environment

Example of a Common Filter for Multiple Feature Sources

Connecting to multiple features simultaneously may take some time to render in a map because, for example, all SHP files are stored in one folder. However, you can reduce the amount of data loaded into a map. When connecting to feature sources, Add to Map With Query and the Create Query dialog box allow you to use the Common Filter in conjunction with the Locate on Map spatial filter.

Common Filter for Multiple SHP Files

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Query Features on Connect ■ 35

Exercise: Use an Attribute Filter with a SDF

In this exercise, you connect to an SDF file that contains parcel polygons. You filter the parcels so that only the features that are on a street called “Brittany Drive” appear in the map.

The completed exercise

1. Open ...\Query Features on Connect\Redding.dwg.

2. In Display Manager, click Data > Connect to Data.

3. In the Data Connect dialog box, click Add SDF Connection.

■ For Connection Name, enter: SDF_PARCELS_BRITTANY_DRIVE.

■ For Source File, click Browse.

4. Browse to ....\Query Features on Connect\.

■ Click Parcels.sdf.■ Click Open.

5. Click Connect.

6. Under Schema, check Parcels.

7. On the Add to Map button, click the down arrow.

■ Click Add to Map with Query.

8. In the Create Query dialog box, click Property > STNAME.

9. Click the Equal To button.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

36 ■ Chapter 1: Establishing a Geospatial Environment

10. Click Get Values.

■ Under Select a Property to Retrieve Its Values, select STNAME.

■ Under Filter the List of Values, enter: BR.■ Click the green arrow button.■ Click BRITTANY DR.■ Click Insert Value.

11. Click OK.

12. Note that only the parcels on Brittany Drive are displayed.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Lesson: Query Features on Connect ■ 37

Exercise: Use a Spatial Filter with a SHP

In this exercise, you limit to a geographic area the number of features in a SHP file that contains valves. Only those valves that are within a drawn rectangle will appear on the map.

The completed exercise

1. Open ...\Query Features on Connect\Redding_QueryFeatures.dwg.

2. In Display Manager, click Data > Connect to Data.

3. In the Data Connect dialog box, ensure the SDF_PARCELS_BRITTANY_DRIVE are connected.

■ If not connected, browse to ...\Query Features on Connect\Parcels.sdf.

■ Click Connect.

4. Click Add SHP Connection.

■ For Connection Name, enter: SHP_VALVES_BRITTANY_DRIVE.

■ Click the File Browse button.

5. In the Open dialog box, browse to ....\Query Feature on Connect\.

■ Click Valves.shp.■ Click Open.

6. Click Connect.

7. Under Schema, check Valves.

■ Click Add to Map with Query.

8. In the Create Query dialog box, click Locate on Map > Inside Rectangle.

9. Create a rectangle around the parcels as shown.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

38 ■ Chapter 1: Establishing a Geospatial Environment

10. Click OK.

11. Close the Data Connect dialog box.

12. Valves are filtered within the rectangle.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

Chapter Summary ■ 39

Chapter Summary

Having completed this chapter, you can:

■ Connect to a feature source.■ Work with point data.■ Use Geospatial Coordinate Systems.■ Use the Attribute and Spatial filters to limit geospatial data that appears in the map.

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale

40 ■ Chapter 1: Establishing a Geospatial Environment

Sample Chapter

Autodesk® Intellectual Property

Not Valid for Sale or R

esale