Click here to Skip to main content
15,889,628 members

Jon Person - Professional Profile



Summary

    Blog RSS
43,196
Author
294
Authority
283
Debator
25
Organiser
1,179
Participant
0
Editor
0
Enquirer
Hi there! From 2004 to 2009 I ran a company called "GeoFrameworks," publishing two components called GPS.NET and GIS.NET which helped developers quickly write location-based services. Now, I've released the source code for GPS.NET to CodePlex for you to use as you see fit.

GPS.NET 2.0 on CodePlex
GPS.NET 3.0 on CodePlex

... I've also released the source code of a library called the "GeoFramework," a collection of commonly used classes such as Latitude, Longitude, Distance, Speed, and Position:

GeoFramework 1.0 on CodePlex
GeoFramework 2.0 on CodePlex

I'm now taking a break from programming, but I really appreciate the positive feedback from readers!
31 Dec 2004 CodeProject MVP 2005

Groups

Below is the list of groups in which the member is participating

Unknown

GeoFrameworks is a privately-held software design and development firm in Denver, Colorado, specializing in the creation of software components for Microsoft's .NET platform. Our products help developers vastly reduce their development time, save money, and quickly become experts with GPS and GIS technologies.



This is a Organisation
This member has Administrator, Manager, Author, Member status in this group

1 members

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralBetter Living Through Immutable Objects Pin
Jon Person14-Feb-05 13:22
Jon Person14-Feb-05 13:22 
GeneralSolving bad form validation with your own Parse method Pin
Jon Person14-Feb-05 13:20
Jon Person14-Feb-05 13:20 
GeneralRe: Solving bad form validation with your own Parse method Pin
jblewis2-May-05 8:57
jblewis2-May-05 8:57 
GeneralWhy the Equals Method Has Different Meanings in Value Types Versus Reference Types Pin
Jon Person14-Feb-05 13:19
Jon Person14-Feb-05 13:19 
GeneralWelcome! Pin
Jon Person14-Feb-05 13:19
Jon Person14-Feb-05 13:19 
QuestionRe: GIS article. Pin
Monomachus2-Nov-08 0:55
Monomachus2-Nov-08 0:55 
AnswerRe: GIS article. Pin
Jon Person6-Nov-08 9:42
Jon Person6-Nov-08 9:42 
GeneralRe: GIS article. Pin
Monomachus4-Dec-08 6:17
Monomachus4-Dec-08 6:17 
GeneralRe: GIS article. Pin
Shooker5610-Jun-10 9:15
Shooker5610-Jun-10 9:15 
Thank you Jon, enjoyed the article. As someone who has written assembly flight simulators and my own utility for viewing GPS tracks in 3-D (think of an aerial view of a roller coaster) with drag-frame analysis, I was immediately struck by "gee what's the software evolution done for me that I used to have to do by hand".

Came across the rotation problem. I'm nearly certain we could use .Net translation to save part of this but I just got it working by brute force, it's running on my machine right now.

First off, remove the hard-coded initialization of the viewport coordinates;

RectangleF viewport; //removed hard-coded viewport

Then create three PointF's min,max,center and initialized the min and max's to huge numbers.

private PointF Min = new PointF(1E30f,1E30f);
private PointF Max = new PointF(-1E30f,-1E30f);
private PointF Center = new PointF();

Add a variable angle. With no interface to change it yet, this one is still hard-coded to 10 degrees.

private float RotationAngle = 10.0f;

After the population of a point in the projectedCoordinate array compare that point to the min and max and updated as needed. Below is the entire loop for initialization of the projectedCoordinate array with 4 lines added to the prior routine (sorry if I missed some of the html conversion of the paste).

// For each geographic coordinate, project it
for (int index = 0; index < projectedCoordinates.Length; index++)
{
// Convert the geographic coordinate to a projected coordinate
projectedCoordinates[index] = plateCaree.Project(geographicCoordinates[index]);
if (Min.X > projectedCoordinates[index].X) Min.X = projectedCoordinates[index].X;
if (Min.Y > projectedCoordinates[index].Y) Min.Y = projectedCoordinates[index].Y;
if (Max.X < projectedCoordinates[index].X) Max.X = projectedCoordinates[index].X;
if (Max.Y < projectedCoordinates[index].Y) Max.Y = projectedCoordinates[index].Y;
}

Here I'm getting the center of the data that has been converted to projection coordinates

// get the center point of the projection data
Center.X = (Max.X + Min.X) / 2.0f;
Center.Y = (Max.Y + Min.Y) / 2.0f;

To understand what is being done. Imagine throwing down a piece of paper 100 feet by 100 feet and driving a stake in its center. Then walk to one of the edges and draw a picture of Nebraska. Now put a magnifying glass over the picture and spin the sheet. The sheet center was 50 feet away and Nebraska simply spun away from the viewport. This code fixes that.

// translate the projection data so that (0,0) is the middle of the data.
for (int index = 0; index < projectedCoordinates.Length; index++)
{
// Center the projection data
projectedCoordinates[index].X -= Center.X;
projectedCoordinates[index].Y -= Center.Y;
}

Now make a viewport who's center is 0,0 and extends to the width of the data


// make the viewport extend to the boundaries of the projection data
viewport = RectangleF.FromLTRB(Min.X - Center.X, Min.Y - Center.Y, Max.X - Center.X, Max.Y - Center.Y);

---

done.. Now to rotate is a one-liner (whew... finally a ONE-LINER). After the command "translate.Reset();" add this

transform.Rotate(RotationAngle); //some interface to change this is needed yet

10.0f is hard-coded, I'm going to add mouse-drag control to change it but you can set 10.0f to anything you like and add any interface to adjust it that suites you.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.