[Gvsig_english] Importing a raster image with gvSIG Mobile

Juan Lucas Dominguez Rubio jldominguez at prodevelop.es
Thu Mar 31 19:10:28 CEST 2011


Hello,thanks for the files.
 
I mean that when you do zoom and pan in gvSIG Mobile, the application does a lot of little things in order to draw the image using as little memory as possible, and if one of those steps is wrong, then the image might be misplaced, but I have never noticed this.
 
I remember that there is a little bug that causes the GPS arrow to be misplaced when you do some zoom and pan: until the next GPS coordinates arrive (and refreshes the GPS arrow), it can be misplaced. Maybe that's the problem you noticed? Is the arrow misplaced even after you have received several new GPS coordinates?
 
To find out who is misplaced (the image or the arrow) you can load a shapefile (which always is ok, I think).You can download some ECW and SHP of Bremenvorde from here:
 
https://correo.prodevelop.es/descarga/gvsig/mobile/
 
 
The files called "...31467..." are in EPSG:31467, in case you prefer those. I created them with GDAL and OGR, so I think they have a little error of 1 or 2 meters (which I think is not a problem in this case).
 
So if you load the JPG, then the SHP and use the GPS, what happens?
 
If the SHP and the JPG are consistent and the GPS is misplaced, then there is a bug related to the GPS arrow (temporarily? always?)
 
If the GPS and the SHP are consistent and the JPG is not, then there is a problem with the WKR driver.
 
 
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: jue 31/03/2011 17:54
Para: Users and Developers mailing list
Asunto: Re: [Gvsig_english] Importing a raster image with gvSIG Mobile


Hello.

I know those performance problems. But if the transformation is performed, it should not be wrong I think :) better would be an error message which tells the user that the image is too big or something...


I cannot upload the image (25MB *.png or 5MB *.jpg), but I have uploaded the jpg to rapidshare, instead. (The png file is about 2MB  too big, it won't even be loaded, so I did not upload it)


	JPG: http://rapidshare.com/files/455277713/jpg-raster.zip
	ECW: http://rapidshare.com/files/455279357/ecw-map.ecw
	


I have compressed the file to ecw, too, but it is not geo-referenced, I think. I tried AU ECW Compressor...because the manual says, it will add geo-information...but it doesn't....not from an extra worldfile.

Well, to load the worldfile of the JPG, you need to change the getWorldFileExtensions() in WKFRasterDriver.java, I think. Or change the extension to *.wld... but I'm sure, you know. (however, jgw seems to be the default one, isn't it?) 


Regards,

Marcel




Am 31.03.2011 17:04, schrieb Juan Lucas Dominguez Rubio: 

	Hello, 
	When zooming in and out with a non-ECW image, the app performs some shift and clip operations to minimize the amount of memory needed. I have never seen any strange bevavior there, but there might be a bug, yes.
	 
	gdal_translate (FWTools) is free and creates faster, more reliable ECW images.
	 
	which format are you using? 
	can you send the image to the list? (with the georef. file if it's not a ecw file)
	 
	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: jue 31/03/2011 16:51
	Para: Users and Developers mailing list
	Asunto: Re: [Gvsig_english] Importing a raster image with gvSIG Mobile
	
	
	Hey all,
	
	I've got new interesting findings :-)
	

	*	The error of the height of the image does not appear at all when I zoom three times. 
	*	When I zoom twice, the error appears only in the middle of the image, but not when I see the background of the Map! I cannot say exactly,... 
	*	But when I does not zoom or only once...or four times or more... the image is not resized I think...it is the original ratio.... 

	I have got some screenshots, so that you might understand it better :)
	
	Perhaps, it is a graphical bug? I don't know...perhaps, somebody's got an idea? would be cool to be fixed!
	
	
	Regards,
	
	Marcel
	
	
	Am 30.03.2011 16:42, schrieb Marcel Schoolmeesters: 

		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


		
		_______________________________________________
		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/20110331/85e96e3c/attachment.htm 


More information about the Gvsig_internacional mailing list