Hello,

Your problem, as you state it, is unfortunately not solvable. (Ha! My
favourite answer in math class: "this problem is impossible").

A simple way for you to see this lack of completeness is to make the
thought experiment where you would "cut the outer 50 pixels all around
your image" to make imageB. To calculate the coordinates of the top left
corner of this imageB, you could re-use *all* the info you give us in
your "I have" section. But since nothing has changed between your
original problem and the problem with imageB, you can see that something
is amiss; if you could solve either problem, you could solve both and
you would get the same answer. This is clearly non-sensical; actually
you can't solve either problem because your setup is under-determined
meaning you need more information to solve your issue.

To approach things the way you are approaching them you would need to
know also (1) the size of each pixel and (2) the number of pixels.
Unfortunately, the ground size of the pixels will not be fixed so you
could not really proceed in the way you have constructed your problem
without a lot of complex math and much more data.

So you need to really look at what other information you can generate
and set up your problem so you can solve it. Alternatively, you may
decide you can't solve your problem but you can fake it by
rubber-sheeting or some other approximation method. If this is a single
time problem, you might be able to fire up uDig with the experimental
rubber-sheeting plugin to get your image "in the right place". 

good luck,
adrian



On Fri, 2007-11-02 at 20:51 -0700, mzorova wrote:
> Hello, 
> 
> I am completely new to GIS and have a project that requires some GIS
> functionality and I have spent the last week (in vain) trying to do it from
> first principles, learn how I might use geotools2 from the geotools wiki and
> the javadocs, and I have to say I am more confused than when I started,
> though I have learnt of the existence of a lot of concepts, I don't quite
> grasp how they might be used to help me solve the problem at hand.
> 
> My problem is as follows:
> 
> I have:
> + an map image in PNG format
> + the latitude and longitude of the CENTER of the above map
> + the projection of the above map (plate carree)
> + the datum used for the above map (NAD83)
> 
> I need:
> + the latitude and longitude of the top left and bottom right corners of the
> map
> + the latitude and longitude of the point that is <width-of-map-image>
> pixels to the right of the center of map
> + the latitude and longitude of the point that is <height-of-map-image>
> pixels to the bottom of the center of the map
> 
> Unfortunately, after all the reading and searching, I am completely lost and
> really do not even know where to start looking. 
> 
> A small snippet of Geotools2 code that does something like the above would
> be incredibly useful in pointing me towards the right modules of the
> geotools codebase where I can dig deeper. I know that has probably something
> to do with the referencing module, but I have NO idea what the code needs to
> look like to get started.
> 
> Any help at all would be GREATLY appreciated. Thanks so much in advance for
> your patience with a newbie query.
> 
> 
> 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to