www.sdlsuite.com Forum Index www.sdlsuite.com
Discussion of technical aspects of the SDL Component Suite
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple linear calibration

 
Post new topic   Reply to topic    www.sdlsuite.com Forum Index -> GeoPack
View previous topic :: View next topic  
Author Message
JCC



Joined: 19 Oct 2006
Posts: 8

PostPosted: Thu Oct 19, 2006 9:16 pm    Post subject: Simple linear calibration Reply with quote

Hi,

I'm looking for a graphic component which can display and scale a picture and superpose icons on it. The purpose is to use it to display facility groundplans. I thought the GeoMap should be able to do this for me. It can zoom and it can draw landmarks. The problem is, I'm totally ignorant towards map navigation and most of the terms are black magic to me Wink
What I want is this:
- Load a JPG (or what ever)
- Calibrate the thing in a linear way (so 0.00 0.00 at the top left and for instance 1.00 1.00 bottom right. If needed, this can be changed to have a 1:1 aspect ratio)
- Add icons/locations to the map. Drawing of landmarks must be done by drawing TBitmaps/TImages on it.

I think I can reverse engineer the simple GeoMap example, but a quick pointer on how to calibrate my map and use custom Landmarks/POIs would be great. (oh.. don't have Delphi but C++ so many example files won't work...)

Thanks,
Johann
Back to top
View user's profile Send private message
JCC



Joined: 19 Oct 2006
Posts: 8

PostPosted: Sat Oct 21, 2006 5:53 pm    Post subject: Reply with quote

I tried to find out how calibration works... Crying or Very sad
I loaded an image and since I don't care about the real world coordinates, I selected biquad.poly calibration, I clicked somewhere near the top left of the image and added a point 0,0, after this I added a calibration point on the right bottom and entered 1,1. The chart is now calibrated, but when I add landmarks, they don't appear where I click??
Back to top
View user's profile Send private message
hlohning



Joined: 08 Sep 2006
Posts: 277
Location: Austria

PostPosted: Sat Oct 21, 2006 9:12 pm    Post subject: Reply with quote

Johann,

you should be careful when using the biquadratic calibration, since it requires at least 7 calibration points to work. If you enter less points the projection will be wrong and most likely the landmarks will not appear on the map.

There is a sample application called "geocal3p" which shows how to perform a valid calibration using only 3 points. You can download this example from the following Web page:

http://www.lohninger.com/examples_part1.html

Regards,

Hans
_________________
Hans Lohninger
Software Development Lohninger
http://www.lohninger.com/
Back to top
View user's profile Send private message Visit poster's website
JCC



Joined: 19 Oct 2006
Posts: 8

PostPosted: Sun Oct 22, 2006 11:47 am    Post subject: Reply with quote

Thanks! Typical RTFM issue.. Embarassed

Still I have one problem to tackle on the use of landmarks. Am I right when I assume that I can only use the predefined symbols for landmarks and that there is no way to make the component use an icon or image instead?
Back to top
View user's profile Send private message
hlohning



Joined: 08 Sep 2006
Posts: 277
Location: Austria

PostPosted: Mon Oct 23, 2006 1:35 pm    Post subject: Reply with quote

You can easily display pictures by using the OnDataRendered event. In the event handler you can draw any number of images at the appropriate positions. See the sample application "movecar" for details:

http://www.lohninger.com/examples_part2.html

Regards,

Hans
_________________
Hans Lohninger
Software Development Lohninger
http://www.lohninger.com/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.sdlsuite.com Forum Index -> GeoPack All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group