get proj

From DavinciWiki
Jump to: navigation, search

Description

Get a Spatial Reference System from spatialreference.org

Arguments and Return Values

Arguments: SRS number and a source

Return Value: the wkt and proj strings if available

Usage

Syntax: get_proj(SRSnumber [,source =STRING])

SRSnumber-the number associated with the spatial reference system

source-projection source "iau2000", "epsg", or "esri", (Default="iau2000")

Examples

Get a standard Mars projection

dv> proj=get_proj(49900)
struct, 2 elements
   anc: struct, 2 elements
       proj4: Text Buffer with 1 lines of text
           1: +proj=longlat +a=3396190 +b=3376200 +no_defs
       wkt: Text Buffer with 5 lines of text
           1: GEOGCS["Mars 2000",
           2:     DATUM["D_Mars_2000",
           3:         SPHEROID["Mars_2000_IAU_IAG",3396190.0,169.89444722361179]],
           4:     PRIMEM["Greenwich",0],
           5:     UNIT["Decimal_Degree",0.0174532925199433]]
   spheroid: struct, 3 elements
       name: "Mars_2000_IAU_IAG"
       radius: "3396190.0"
       iflattening: "169.8944472"

Set a different source, e.g. epsg

dv> proj2=get_proj(4326,source="epsg")
struct, 2 elements
   anc: struct, 2 elements
       proj4: Text Buffer with 1 lines of text
           1: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
       wkt: Text Buffer with 10 lines of text
           1: GEOGCS["WGS 84",
           2:     DATUM["WGS_1984",
           3:         SPHEROID["WGS 84",6378137,298.257223563,
           4:             AUTHORITY["EPSG","7030"]],
           5:         AUTHORITY["EPSG","6326"]],
           6:     PRIMEM["Greenwich",0,
           7:         AUTHORITY["EPSG","8901"]],
           8:     UNIT["degree",0.01745329251994328,
           9:         AUTHORITY["EPSG","9122"]],
           10:     AUTHORITY["EPSG","4326"]]
   spheroid: struct, 3 elements
       name: "WGS 84"
       radius: "6378137"
       iflattening: "298.2572236"

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

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

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 05-12-2013
Modified On: 05-12-2013

Personal tools