Code covered by the BSD License  

Highlights from
SP_PROJ

5.0

5.0 | 1 rating Rate this file 11 Downloads (last 30 days) File Size: 6.82 KB File ID: #26413

SP_PROJ

by Andrew Stevens

 

19 Jan 2010 (Updated 21 Jan 2010)

Convert to and from US state plane coordinates

| Watch this File

File Information
Description

SP_PROJ converts between geographic (latitude and longitude) and US state plane coordinates. SP_PROJ can perform both forward (from geographic to state plane) and inverse transformations (from state plane to geographic). All US state plane zones are included except for Alaska. Calculations assume the NAD83 datum and GRS1980 spheriod.

Mapping toolbox is required. SP_PROJ creates the map structure for the specified US state plane zone and passes it to either PROJFWD and PROJINV to perform the coordinate transformations.

EXAMPLE

 %geographic data
lat = 37.45569;
 lon = -122.17009;

% Calculate the x,y, coordinates in survey feet
% in the 'California 1' state plane zone.

[xsp,ysp] = sp_proj('california 1','forward',lon,lat,'sf')

% Re-calculate the geographic coordinates
% also output the map structure as optional 3rd output

[lon1,lat1,mstruct] = sp_proj('california 1','inverse',xsp,ysp,'sf')

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
deg2utm

Required Products Mapping Toolbox
MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
25 Jan 2011 Brett Baker

Seems to work as advertised-thank you!

Please login to add a comment or rating.
Updates
21 Jan 2010

fixed output order for inverse calculation

Tag Activity for this File
Tag Applied By Date/Time
coordinate transformation Andrew Stevens 20 Jan 2010 10:12:45
earth science Andrew Stevens 20 Jan 2010 10:12:45
gis Andrew Stevens 20 Jan 2010 10:12:45

Contact us at files@mathworks.com