Hi Artem

You're right, just subscribed.

Again you are right, I want to turn screen coordinates into real world ones
and from there on I will be able to turn them into MGRS rather than just
UTM.

I've been trying this with the simple viewer:

     CoordTransform
t(map_->getWidth(),map_->getHeight(),map_->getCurrentExtent());
      double x = (double) e->x();
      double y = (double) e->y();
      coord2d coord;
      coord = coord2d(x, y);
      t.backward(coord);
      std::cout << coord << std::endl;

Stockholm, Sweden is here coord2(1614085.074371404,6574896.886350079).

Now I've really been trying to figure out what this represents but I
couldn't find it anywhere.

Best regards,
Carl


Artem Pavlenko-5 wrote:
> 
> Hi Carl,
> 
> Could you provide more details. Are you not sure how to translate 'screen'
> coordinates into 'world' ? Or do you want to re-project them into UTM also
> ?
> 
> Please, consider subscribing to mapnik-users as anonymous postings are not
> allowed.
> 
> Regards
> Artem
> 
> 2009/1/2 Carl Johansson <[email protected]>
> 
>>
>> Hi,
>>
>> I've been trying to get a QString representation of the UTM coordinate
>> pressed at in the Mapnik Viewer. Now I think that I should use some
>> member
>> of CoordTransform passing it the coordinates from the widget. However
>> that's
>> where I get rather lost. Could anyone point me in the right direction?
>> Already tried looking at posts like
>>
>> http://www.nabble.com/how-to-put-a-symbol-in-a-given-coord--tp19164492p19164492.html
>> .
>>
>> Carl
>> --
>> View this message in context:
>> http://www.nabble.com/Getting-UTM-coordinates-from-Mapnik-Viewer-tp21250174p21250174.html
>> Sent from the Mapnik - Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Mapnik-users mailing list
>> [email protected]
>> https://lists.berlios.de/mailman/listinfo/mapnik-users
>>
> 
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Getting-UTM-coordinates-from-Mapnik-Viewer-tp21370149p21405648.html
Sent from the Mapnik - Users mailing list archive at Nabble.com.

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to