Wixon_Valley - Copy

Wixon_Valley - Copy - end % Load in points to classify...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
% PROGRAM Wixon_Valley.m % % Purpose: % This program reads in the location of the boudary corners defining % Wixon Valley, Texas, then converts them to state plane coordinates, and then % checks whether the random points are inside or outside the city limits. % % Define variables: % points -- Points % randompoints -- Random points % n -- Classified random points % latp -- Latitude of points in decimal degrees % longp -- Longitude of points in decimal degrees % % % Garrett Lucas % 317009025 % Spring 2010 % Load in the way points load WV_Boundary.dat % Convert points to decimal degrees points = zeros(length(WV_Boundary),2); for i = 1:size(WV_Boundary,1); points(i,1) = WV_Boundary(i,1) + WV_Boundary(i,2)/60 + WV_Boundary(i,3)/3600; points(i,2) = WV_Boundary(i,4) + WV_Boundary(i,5)/60 + WV_Boundary(i,6)/3600; % Store northing in y-component and easting in x-component [points(i,2),points(i,1)] = gcpg83(points(i,1),points(i,2));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: end % Load in points to classify [latp, longp] = get_points; % Convert random points to state plane coordinates randompoints = zeros(length(latp),2); for i = 1:length(latp) [randompoints(i,2),randompoints(i,1)] = gcpg83(latp(i),longp(i)); end % Classify random points n = zeros(length(points)+1,2); for i = 1:length(points) n(i,1) = points(i,1); n(i,2) = points(i,2); n(length(n),1) = points(1,1); n(length(n),2) = points(1,2); end % Create Plot in = inpolygon(randompoints(:,1),randompoints(:,2),n(:,1),n(:,2)); plot(n(:,1),n(:,2),randompoints(in,1),randompoints(in,2),'*r', randompoints(~in,1),randompoints(~in,2),'.b') axis([1.081*10^6 1.087*10^6 3.126*10^6 3.131*10^6]); title('\bfClassification of Points near Wixon Valley, Texas'); xlabel('\bfEasting (Central Texas Zone NAD-83), (m)'); ylabel('\bfNorthing (Central Texas Zone NAD-83), (m)');...
View Full Document

This note was uploaded on 11/09/2011 for the course CVEN 489 taught by Professor Staff during the Spring '08 term at Texas A&M.

Ask a homework question - tutors are online