Coyote Graphics Routines

Date: Fri Mar 27 12:14:20 2015

single page | use frames     summary     class     fields     routine details     file attributes

.\

cgshapeinfo.pro

Utilities


The purpose of this program is allow the user to browse a very narrow selection of shapefiles. Namely, those containing geographical shapes in latitude and longitude coordinates. In other words, shapefiles containing maps. File attributes are listed in the left-hand list widget. Clicking on a file attribute, will list all the entity attributes for that file attribute in the right-hand list. Clicking an entity attribute with list the type of entity, and the X and Y bounds of that entity (shown as LON and LAT, respectively), in the statusbar at the bottom of the display.

Knowing the attribute and entity names of a shapefile will give you insight into how to read and display the information in the file. For examples, see the Coyote Library program cgDrawShapes.

Examples

To learn about and draw the states.shp file in the IDL examples directory:

filename = Filepath(SubDir=['examples','data'], 'states.shp') cgShapeInfo, filename, XRANGE=xr, YRANGE=yr cgPlot, xr, yr, /NoData, XStyle=1, YStyle=1 cgDrawShapes, filename

Author information

Author

FANNING SOFTWARE CONSULTING:

David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com

Copyright

Copyright (c) 2006-2013, Fanning Software Consulting, Inc.

History

Modification History:

Written by David W. Fanning, 21 October 2006. Slight modifications to the interface. 14 May 2010. DWF. Added XRANGE and YRANGE output keywords. 15 May 2010. DWF. Renamed cgShapeFile from Shapefile. 20 Aug 2012. DWF. Modified so that when the user selects a new Attribute Name, the Attribue Value index stays the same. 24 Nov 2013. DWF. Fixed a type with a progress bar. 26 March 2014. DWF.

Routines

cgShapeInfo_Events, event

The event handler for the program.

cgShapeInfo_Cleanup, tlb

The clean-up routine for the program.

cgShapeInfo [, filename] [, XRANGE=float] [, YRANGE=float]

The calling program for learning more about the contents of the shapefile.

Routine details

top cgShapeInfo_Events

cgShapeInfo_Events, event

The event handler for the program.

Parameters

event in required type=struct

The event structure passed by the window manager.

top cgShapeInfo_Cleanup

cgShapeInfo_Cleanup, tlb

The clean-up routine for the program.

Parameters

tlb in required type=long

The identifier of the widget that just died.

top cgShapeInfo

cgShapeInfo [, filename] [, XRANGE=float] [, YRANGE=float]

The calling program for learning more about the contents of the shapefile.

Parameters

filename in optional type=string

The name of the shapefile you wish to browse. If not provided, the user will be asked to select a shapefile.

Keywords

XRANGE out optional type=float

The X range of the shapefile contents in the native units of the shapefile.

YRANGE out optional type=float

The Y range of the shapefile contents in the native units of the shapefile.

File attributes

Modification date: Fri Mar 27 11:07:38 2015
Lines: 361
Docformat: rst rst