Wrox Programmer Forums
|
BOOK: Visual Basic 2005 Programmer's Reference
This is the forum to discuss the Wrox book Visual Basic 2005 Programmer's Reference by Rod Stephens; ISBN: 9780764571985
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2005 Programmer's Reference section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 22nd, 2008, 02:23 PM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to geofran80
Default

Dear friends, I'd like to create a geographic canvas from a form or picturebox as Jon Masterson.

If Rod or Jon, can contact to me to tell my anything about this.

I have a reader of geometry class and I need to show in the canvas in real mercator (metric) coordinates, or Lat/Lon coordinates.

How can I do to show this?

Thanks for advanced.

Francisco J.
GIS Analyst and Developer.
gistdt05@hotmail.com
 
Old July 22nd, 2008, 02:43 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

It depends on what your geometry class is and what the reader does. What kind of data does it load? Point and line data? Topography?

I'm not sure exactly what you need to do. If you need to draw points, lines, etc. that you loaded from the file, you can use the Graphics object's transformation methods to make this a little easier. Lat/Long will be easiest, although remember there will be some deformation over long distances.

If you look over the previous posts in this thread, it may help with the scaling.

Rod

Rod Stephens, Visual Basic MVP

Visual Basic 2008 Programmer's Reference
http://www.amazon.com/exec/obidos/AS...2628/vbhelper/
 
Old July 22nd, 2008, 03:48 PM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to geofran80
Default

Thanks Rod,

I have to load Points, Lines and Polygons shapes, I have some files as Shapefile (standard for Geographic Information Systems - ESRI) and another files simmilar to CAD.

I thought that it would be more useful to load the data in metric coordinates (as Mecartor or another projection) because the units was more convertible to metric not angular (Lat/Lon).

If I have a file as the following (in ASCII, TXT or CSV format)

IDPoint, XCoordPoint, YCoordPoint
1, 450342.25, 7438278.10
2, 530724.27, 7349827.11
.
.
.
25, 127832.21, 7872827.45

These coordinates are in meters from the origin x (greendwich meridiam) and origin y (ecuator paralel)

If i want to load that file that would show all points in the canvas, how can I do to translate or scale the canvas conform I add new points and show in real coordinates if the canvas or picture, form, and so is shown in pixel units?

Thanks for a lot of.

Francisco J.
GIS Analyst and Developer
gistdt05@hotmail.com
 
Old July 23rd, 2008, 09:55 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

You should probably use the Graphics object's transformation methods to define a scale so you can plot the points in their native coordinates. The object will automatically scale them appropriately.

If you really want to learn where the transformed points are, you can use the object's properties to get its transform matrix and apply it to the points. Or you could write your own transformation. But those seem like a lot of work.

Rod

Rod Stephens, Visual Basic MVP

Visual Basic 2008 Programmer's Reference
http://www.amazon.com/exec/obidos/AS...2628/vbhelper/
 
Old July 23rd, 2008, 11:21 AM
Registered User
 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to geofran80
Default

Many thanks Rod,

I will try it.

I have transformation methods to convert in UTM (projected coordinates) the Lat/Lon values of points, but i didn't know how can I do to translate/scale my canvas.

I will try it and comment my results here.

Thanks.

Francisco J.
GIS Analyst and Developer.
gistdt05@hotmail.com

Francisco J.
GIS Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
c/c++ graphics hafizmuhammadmushtaq C++ Programming 0 October 19th, 2007 11:33 PM
graphics in c++ himutg C++ Programming 1 December 12th, 2006 08:22 AM
Help on graphics steparths C++ Programming 0 June 30th, 2006 02:09 PM
graphics in C++ MASTER_1st C++ Programming 2 November 28th, 2005 12:02 AM
Graphics Control Dataman Access 2 March 5th, 2004 03:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.