[Gvsig_english] Importing a raster image with gvSIG Mobile
Marcel Schoolmeesters
schoolmeesters at gmx.de
Wed Mar 30 16:42:29 CEST 2011
Thanks for the explanation.
As I said, the ImageExt values are correct...(y is calculated by _y +
_h, I think) .....I have debugged the data flow and everything is
understandable up to this function (and afterwards. What the function is
doing might be clear, and even the values of the viewRect, too,...after
your little explanation, what should be self-evident :-)
However, the final lower/left edge of the picture is not shown at
53.475096504° where it should be, but somewhere at 53.464...and I cannot
find the code where this is calculated...(but better to say that I have
given up because of so many steps...)
Best regards,
Marcel
Am 30.03.2011 09:32, schrieb Juan Lucas Dominguez Rubio:
> Hello,
> that method computes the extent of the view when you add the first
> layer. The app knows the size of the screen and the extent of the
> layer, and their ratios are different, so you have to do a simple
> computation to find out the extent of the new view.
> Maybe you have misunderstood the extent of a layer and the extent of
> the view?
> When you add the first layer, the extent of the view is the smallest
> rectangle which contains the extent of the layer and, at the same
> time, respects the width/height ratio of the screen, of course.
> Regards,
> Juan Lucas Domínguez Rubio
> ---
> Prodevelop SL, Valencia (España)
> Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
> http://www.prodevelop.es <http://www.prodevelop.es/>
> ---
>
> ------------------------------------------------------------------------
> *De:* gvsig_internacional-bounces at listserv.gva.es en nombre de Marcel
> Schoolmeesters
> *Enviado el:* mar 29/03/2011 21:20
> *Para:* Users and Developers mailing list
> *Asunto:* Re: [Gvsig_english] Importing a raster image with gvSIG Mobile
>
> well, I think the main problem of understanding is in function
> MapContext.*getExtentFromFullExtentAndImageSize*() ... I think the new
> height etc are calculated there?
>
> Am 29.03.2011 21:00, schrieb Marcel Schoolmeesters:
>
> Hello,
>
> I have tried to load a raster image (had to try jpg, because *.png
> did not even load), but I am getting a wrong position of the
> extent. Anybody got the same error?
>
> I have tried the debug mode, but there are too many functions to
> catch on. Perhaps anybody can help?
>
> Somewhere the map origin is changed from the upper edge to the
> lower edge, that far I could follow, but then the image extent
> (height) and the origin coords (of Y) has been changed. Why? it
> seems to be very hard to understand the whole way of building the
> image at the right place.
>
> However, in attachment the original rectangle and the changed one
> are shown with their values while debugging...
>
> The lower edge of the final image is positioned between those Y
> values (@ 53.464) but it needs to be positioned at 53.475....
>
> what is getRasterTansformation() actually doing?
>
>
> Thanks in advance, if anybody can help. However, that issue should
> be fixed, I think. The import of PNG is not even possible, as I
> mentioned before..
>
> Regards
>
> Marcel
>
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20110330/10c9b145/attachment.htm
More information about the Gvsig_internacional
mailing list