Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  Data Control  >  ENVIPseudoRasterSpatialRef

ENVIPseudoRasterSpatialRef

ENVIPseudoRasterSpatialRef

This is a reference to an ENVIPseudoRasterSpatialRef object.

See the code example below for instructions on creating a new ENVIPseudoRasterSpatialRef object. You can also retrieve the reference to an ENVIPseudoRasterSpatialRef object associated with a raster with ENVIRaster's SPATIALREF property.

Pseudo map information refers to a non-standard projection that involves an affine map transformation. When an image is not georeferenced to a standard map projection and you only know the geographic coordinates and map projection of four points in the image, you can define these tie points in an ENVI header file or in the metadata of the raster object. ENVI will use these points to warp the image and to calculate geographic coordinates for each pixel. The pixel size varies in the rectified image. This type of projection contains a high degree of variability and is not geographically accurate; the (x,y) locations in the rectified image are only best guesses.

If a data set has more than one type of map information (for example, a standard map projection and pseudo map information), the standard map projection will take precedence and determine the base projection.

Note: To achieve the highest level of accuracy when creating this object, specify values as double-precision floating point numbers.

Example


; Launch the application
e = ENVI()
 
; Define the spatial reference object data
pseudoGeoPoint1 = [1.0000000D, 1.0000000D, -117.07201D, 32.893801D]
pseudoGeoPoint2 = [1002.0000D, 1.0000000D, -116.95856D, 32.873647D]
pseudoGeoPoint3 = [1.0000000D, 1002.0000D, -117.09961D, 32.806283D]
pseudoGeoPoint4 = [1002.0000D, 1002.0000D, -116.98626D, 32.786154D]
 
; Create a custom spatial reference object
spatialRef1 = ENVIPseudoRasterSpatialRef( $
  PSEUDO_GEO_POINT_1=pseudoGeoPoint1, $
  PSEUDO_GEO_POINT_2=pseudoGeoPoint2, $
  PSEUDO_GEO_POINT_3=pseudoGeoPoint3, $
  PSEUDO_GEO_POINT_4=pseudoGeoPoint4)
 
; Open a file but override its spatial reference information
file = FILEPATH('qb_boulder_msi', ROOT_DIR=e.ROOT_DIR, $
  SUBDIRECTORY = ['data'])
raster = e.OpenRaster(file, SPATIALREF_OVERRIDE=spatialRef1)
 
; Retrieve and print the spatial reference 
spatialRef = raster.SPATIALREF
PRINT, spatialRef

Syntax


Result = ENVIPseudoRasterSpatialRef([, Properties=value, ERROR=value])

Methods


ConvertFileToFile

ConvertFileToMap

ConvertLonLatToLonLat

ConvertLonLatToMap

ConvertLonLatToMGRS

ConvertMapToFile

ConvertMapToLonLat

ConvertMapToMap

ConvertMGRSToLonLat

Dehydrate

Hydrate

Properties


Properties marked as (Get) can be retrieved, but not set.

COORD_SYS_CODE (Get)

Use this property to get a geographic (GEOGCS) or projected (PROJCS) coordinate system code.

For a full list of coordinate system strings and codes, refer to the following text files in the \IDLxx\resource\pedata\predefined directory of the ENVI distribution:

  • EnviPEProjcsStrings.txt: PROJCS codes and strings
  • EnviPEGeogcsStrings.txt: GEOGCS codes and strings

COORD_SYS_STR (Get)

Use this property to get a geographic (GEOGCS) or projected (PROJCS) coordinate system string.

For a full list of coordinate system strings and codes, refer to the following text files in the \IDLxx\resource\pedata\predefined directory of the ENVI distribution:

  • EnviPEProjcsStrings.txt: PROJCS codes and strings
  • EnviPEGeogcsStrings.txt: GEOGCS codes and strings

PSEUDO_GEO_POINT_1, PSEUDO_GEO_POINT_2, PSEUDO_GEO_POINT_3, PSEUDO_GEO_POINT_4 (Init, Get)

Each property is a four-element array [X Pixel, Y Pixel, Longitude, Latitude] specifying a geographic corner for a non-georeferenced file. Depending on the data source, not all four properties may contain information. The four points do not have to be in any specific order.

Keywords


ERROR (optional)

Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.

When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.

See Manage Errors for more information on error handling in ENVI programming.

Version History


ENVI 5.1

Introduced; Added ability to serve as a constructor function for creating new pseudo spatial reference objects.

ENVI 5.3, Service Pack 1

Added Dehydrate method

ENVI 5.4

Added Hydrate method

API Version


3.2

See Also


ENVIGLTRasterSpatialRef, ENVIRPCRasterSpatialRef, ENVIStandardRasterSpatialRef



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us