a developers guide to arcgis 10 geodatabase types - custom...

11
A Developers Guide to ArcGIS 10 Geodatabase Types Custom Raster Format Support in ArcGIS 10 through GDAL Joe Roubal

Upload: others

Post on 02-Apr-2020

28 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

A Developers Guide to ArcGIS 10 pGeodatabase Types

Custom Raster Format Support in ArcGIS 10 through GDAL

Joe Roubal

Page 2: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

ScheduleScheduleScheduleSchedule

•• Today we will coverToday we will cover–– Creating a GDAL Driver to support custom raster formatsCreating a GDAL Driver to support custom raster formats

•• GDAL Data Model and interfacesGDAL Data Model and interfaces

–– Adding the new driver to Adding the new driver to ArcGISArcGIS 1010•• Options for supporting custom Options for supporting custom geodatageodata transformationstransformations

•• I will answer questions at the endI will answer questions at the end•• I will answer questions at the endI will answer questions at the end

Please complete the session survey!Please complete the session survey!

Page 3: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

Imagery and Raster inImagery and Raster in ArcGISArcGIS 1010Imagery and Raster in Imagery and Raster in ArcGISArcGIS 1010

•• GDAL is the standard method for accessing raster formatsGDAL is the standard method for accessing raster formats–– Support almost all common raster formatsSupport almost all common raster formats

New formats can be supportedNew formats can be supported–– New formats can be supportedNew formats can be supported–– ArcGISArcGIS provides an provides an ArcObjectsArcObjects abstraction layerabstraction layer

•• Image Management Resource Center has a new sample driverImage Management Resource Center has a new sample driverI l d GDAL fil f i 1 4 (I l d GDAL fil f i 1 4 (A GISA GIS 9 ) d 1 6 (9 ) d 1 6 (A GISA GIS 10)10)–– Includes GDAL files for version 1.4 (Includes GDAL files for version 1.4 (ArcGISArcGIS 9.x) and 1.6 (9.x) and 1.6 (ArcGISArcGIS 10)10)

–– Illustrates support for custom Illustrates support for custom geodataXformgeodataXform

Page 4: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

www gdal orgwww gdal orgwww.gdal.orgwww.gdal.org

•• Open source initiativeOpen source initiative

•• Documents data modelDocuments data model•• Documents data modelDocuments data model–– GDALPamDatasetGDALPamDataset–– GDALRasterBandGDALRasterBand

•• Includes many driver examplesIncludes many driver examplesSource code for existing driversSource code for existing drivers–– Source code for existing driversSource code for existing drivers

•• Provides a tutorial for creating a new driver (JDEM)Provides a tutorial for creating a new driver (JDEM)–– Uses GDAL 1.4, tailored to Uses GDAL 1.4, tailored to ArcGISArcGIS 9.39.3

Page 5: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

GDAL Data ModelGDAL Data ModelGDAL Data ModelGDAL Data Model

•• GDALPamDatasetGDALPamDataset –– inherits from inherits from GDALDatasetGDALDataset–– Open Open –– Sets values, creates Sets values, creates GDALRasterBandGDALRasterBand objectsobjects–– Set / Get Set / Get ProjectionRefProjectionRefS / GS / G jj–– Set / Get Set / Get GeoTransformGeoTransform–– Set / Get MetadataSet / Get Metadata

C t C t (f it bl f t )C t C t (f it bl f t )–– Create, Copy, etc. (for writeable formats)Create, Copy, etc. (for writeable formats)

•• GDALRasterBandGDALRasterBand–– GetXSizeGetXSize, , GetYSizeGetYSize, etc., etc.–– GetBlockSizeGetBlockSize

R dBl kR dBl k–– ReadBlockReadBlock–– WriteBlockWriteBlock (for writable formats)(for writable formats)

Page 6: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

ArcGISArcGIS 10 and GDAL10 and GDAL PluginsPluginsArcGISArcGIS 10 and GDAL 10 and GDAL PluginsPlugins

•• GDAL GDAL PluginsPlugins can be created and recognized by can be created and recognized by ArcGISArcGIS 1010

•• Must use GDAL 1 6 or higherMust use GDAL 1 6 or higher•• Must use GDAL 1.6 or higherMust use GDAL 1.6 or higher

•• Must be placed in a particular directoryMust be placed in a particular directory–– Specific naming convention for DLL fileSpecific naming convention for DLL file–– Specific naming convention for registration methodSpecific naming convention for registration method

•• Must have entry in RasterFormats.datMust have entry in RasterFormats.dat

Page 7: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

ArcGISArcGIS 10 and GDAL10 and GDALArcGISArcGIS 10 and GDAL10 and GDAL

•• New GUI for registering a new GDAL New GUI for registering a new GDAL pluginplugin–– Copies DLL to proper directoryCopies DLL to proper directory–– Updates RasterFormats.datUpdates RasterFormats.datUpUp

•• Several ways to support custom Several ways to support custom geodatageodata transformstransformsS ff ( f )S ff ( f )–– Standard affine (like a World file)Standard affine (like a World file)

–– By unique file extension By unique file extension •• For existing GDAL driversFor existing GDAL drivers•• Transform can be extracted from the fileTransform can be extracted from the file

–– GDAL Metadata GDAL Metadata •• For new GDAL driversFor new GDAL drivers•• Transform stored as XML metadataTransform stored as XML metadata

Page 8: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

ESRI GDAL Driver SampleESRI GDAL Driver SampleESRI GDAL Driver Sample ESRI GDAL Driver Sample

•• Uses GDAL 1.6, suitable for Uses GDAL 1.6, suitable for ArcGISArcGIS 1010–– Also includes GDAL 1.4 files for Also includes GDAL 1.4 files for ArcGISArcGIS 9.x implementations9.x implementations

•• Illustrates mechanics of adding a GDAL driver to Illustrates mechanics of adding a GDAL driver to ArcGISArcGIS 1010–– Visual Studio 2008 C++ compiler using Visual Studio 2008 C++ compiler using nmakenmake

•• Illustrates different ways to support Illustrates different ways to support geodatageodatatransformationstransformations

–– Three variations of GDAL driverThree variations of GDAL driver

A il bl t I M t R C tA il bl t I M t R C t•• Available at Image Management Resource CenterAvailable at Image Management Resource Center

Page 9: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

DemoDemo –– Adding a new GDAL driverAdding a new GDAL driverDemo Demo Adding a new GDAL driverAdding a new GDAL driver

•• Brief look at code, RasterFormats.dat, Brief look at code, RasterFormats.dat, nmakenmake

•• Add new driver (first version, standard Add new driver (first version, standard georeferencinggeoreferencing))–– OpenOpen ArcMapArcMap try to open file (won’t work)try to open file (won’t work)–– Open Open ArcMapArcMap, try to open file (won t work), try to open file (won t work)–– Use GUI to add GDAL Use GUI to add GDAL pluginplugin–– Open fileOpen file

•• Discuss custom geotransform optionsDiscuss custom geotransform options–– Second versionSecond version –– usingusing customXformcustomXform–– Second version Second version –– using using customXformcustomXform–– Third version Third version –– using using customXformcustomXform–– Demonstrated at Technical Session Thursday morningDemonstrated at Technical Session Thursday morning

•• Extending Raster CapabilitiesExtending Raster Capabilities

Page 10: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

SummarySummarySummarySummary

•• Today we covered brieflyToday we covered briefly

–– GDAL Data ModelGDAL Data ModelGDAL Data ModelGDAL Data Model

–– How to add a GDAL Driver How to add a GDAL Driver pluginplugin to to ArcGISArcGIS 1010

–– Where to find more detailed information and tutorialsWhere to find more detailed information and tutorials

Still have questions?Still have questions?

Page 11: A Developers Guide to ArcGIS 10 Geodatabase Types - Custom ...proceedings.esri.com/library/userconf/devsummit10/papers/tech/cus… · Imagery and Raster inImagery and Raster in ArcGIS

Questions?Questions?Questions?Questions?

•• Please fill out the session surveyPlease fill out the session survey•• Please fill out the session surveyPlease fill out the session survey

•• Thank you!Thank you!