add gcps geo

From DavinciWiki
Jump to: navigation, search

Description

Add ground control points given a lat/lon/optional elevation backplanes to a davinci Geo-Struct

Arguments and Return Values

Arguments: the backplanes and a davinci Geo-Struct (.data and backplanes must be the same size)

Return Value: a davinci Geo-Struct with the gcps added

Usage

Syntax: add_gcps_geo(Geo-Struct, lon, lat [,elev=VAL][,sampling=INT][,xsampling=INT][,ysampling=INT])

Geo-Struct - the davinci Geo-Struct

lon - a longitude backplane the same size as the .data of the Geo-Struct

lat - a latitude backplane the same size as the .data of the Geo-Struct

elev = an elevation backplane the same size as the .data of the Geo-Struct (optional)

sampling - x/y pixel sampling (# of x/y gcps) (Default = 100)

xsampling - x pixel sampling (# of x gcps) (Default = sampling)

ysampling - y pixel sampling (# of y gcps) (Default = sampling)

Examples

dv> lat=read_geo("master/san_carlos/MASTERL1B_1094600_05_20100901_1838_1903_V01.hdf",subdata=10).data
716x8800x1 array of double, bsq format [50,406,400 bytes]

dv> lon=read_geo("master/san_carlos/MASTERL1B_1094600_05_20100901_1838_1903_V01.hdf",subdata=11).data
716x8800x1 array of double, bsq format [50,406,400 bytes]

dv> a=read_geo("master/san_carlos/MASTERL1B_1094600_05_20100901_1838_1903_V01.hdf",subdata=17)
struct, 4 elements
   anc: struct, 2 elements
       metadata: struct, 49 elements...
       subdata: struct, 2 elements...
   w: 716   
   h: 8800   
   data: 716x8800x50 array of short, bip format [630,080,000 bytes]

dv> out=add_gcps_geo(a,lon,lat)
struct, 4 elements
   anc: struct, 3 elements
       metadata: struct, 49 elements...
       subdata: struct, 2 elements...
       gcps: Text Buffer with 704 lines of text
           1: 1 1 -110.215987 33.430099 0.000000
           2: 1 101 -110.246572 33.436627 0.000000
           3: 1 201 -110.277240 33.441807 0.000000
           4: 1 301 -110.307302 33.446461 0.000000
           5: 1 401 -110.337801 33.452207 0.000000
           6: 1 501 -110.368597 33.456960 0.000000
           7: 1 601 -110.398829 33.462016 0.000000
           8: 1 701 -110.430293 33.469035 0.000000
           9: 1 801 -110.461820 33.474197 0.000000
           10: 1 901 -110.492544 33.479674 0.000000
   w: 716   
   h: 8800   
   data: 716x8800x50 array of short, bip format [630,080,000 bytes]

dv> tmp=proj_geo(out,"+proj=latlong")
Writing /tmp/dv_20007/proj_geo_orig.tmp.tiff: 716x8800x1 TIFF file.
Attaching Ancellary Data to /tmp/dv_20007/proj_geo_orig.tiff: 716x8800x1 GeoTIFF File.
Done.
struct, 12 elements
   anc: struct, 12 elements
       wkt: Text Buffer with 5 lines of text
           1: GEOGCS["WGS 84",
           2:     DATUM["unknown",
           3:         SPHEROID["WGS84",6378137,298.257223563]],
           4:     PRIMEM["Greenwich",0],
           5:     UNIT["degree",0.0174532925199433]]
       metadata: struct, 1 elements...
       proj4: "'+proj=longlat +ellps=WGS84 +no_defs '"
       origin: 1x2x1 array of double, bsq format [16 bytes]
       pixel_size: 1x2x1 array of double, bsq format [16 bytes]
       x: -365427.2256   
       y: 109532.4639   
       lat: 1x5x1 array of float, bsq format [20 bytes]
       lon: 1x5x1 array of float, bsq format [20 bytes]
       lpo: 1x5x1 array of float, bsq format [20 bytes]
       spo: 1x5x1 array of float, bsq format [20 bytes]
       center: 2x1x1 array of float, bsq format [8 bytes]
   spheroid: struct, 3 elements
       name: "WGS84"
       radius: "6378137"
       iflattening: "298.2572236"
   resolution: 0.0003090695245   
   x: -365427.2256   
   y: 109532.4639   
   ul: 2x1x1 array of float, bsq format [8 bytes]
   ur: 2x1x1 array of float, bsq format [8 bytes]
   ll: 2x1x1 array of float, bsq format [8 bytes]
   lr: 2x1x1 array of float, bsq format [8 bytes]
   w: 8809   
   h: 2117   
   data: 8809x2117x1 array of short, bsq format [37,297,306 bytes]

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Recent Library Changes

Created On: 04-24-2013
Modified On: 05-02-2013

Personal tools