erikbroo / gmapcatcher

Automatically exported from code.google.com/p/gmapcatcher
0 stars 0 forks source link

Write world file when exporting map image #420

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
First of all: Congratulations on your work, very useful program. It would be 
pretty good for working with images (exported through the "Export 
image"-function) if the program would write world files that can be recognized 
by GIS software. It's relatively easy to do this manually, but it would be 
useful.

Original issue reported on code.google.com by struktur...@gmail.com on 20 Nov 2014 at 9:25

GoogleCodeExporter commented 8 years ago
If you can do the research and provide precise details...
I will code it for you

Original comment by heldersepu on 20 Nov 2014 at 5:56

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Here's a description of the format. It can be recognized by many GIS programs. 
I think for the PNG files generated ".PGW" would be needed. It's basically just 
a renamed text file.
I've attached an example that I've created myself with an image exported by 
.GMapCatcher and ArcGIS 10.2.2. I initially used QGIS to georeference the image 
(see the tutorials on the following page for details):
http://www.qgis.org/en/site/
You can try it out with this software as well (because an ArcGIS license is 
pretty expensive if you don't have one).

Specifications of the format can be found here:
http://en.wikipedia.org/wiki/World_file
Had to resample it to be able to upload it. If you need another example just 
contact me.

Greetings,
Lars

Original comment by struktur...@gmail.com on 5 Dec 2014 at 11:21

Attachments:

GoogleCodeExporter commented 8 years ago
Yes the generated ".PGW" loops simple, just 6 lines in a text file:
0.0009440562
0.0000000000
0.0000000000
-0.0007778740
72.4223470281
25.4031960362

the bottom two I can get, but the rest I have no clue how to get them...

Original comment by heldersepu on 5 Dec 2014 at 2:08

GoogleCodeExporter commented 8 years ago
OK, 2 and 3 should always be zero, because they define rotation of the image. 
Line one is related to the pixel size. I've found another explanation here:
http://webhelp.esri.com/arcims/9.2/general/topics/author_world_files.htm
QGIS seems to store georeferencing information for raster files differently, in 
an .xml file. But it can read ESRI world files as well. Attached you find an 
example for a QGIS georeference, along with the corresponding image.
If you need some more help, I guess it should be possible to correspond with 
the QGIS developing team about that (I'm no programmer myself) over the 
following mailing lists:
http://www.qgis.org/en/site/getinvolved/mailinglists.html#qgis-mailinglists

A georeference that could be read with QGIS would also mean that it could be 
used in ESRI ArcGIS (can be exported in readable format for ArcGIS from there).

Original comment by struktur...@gmail.com on 5 Dec 2014 at 4:00

Attachments:

GoogleCodeExporter commented 8 years ago
OK, here's some more information from ESRI:
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?pid=3034&topicname=World_fil
es_for_raster_datasets

http://resources.arcgis.com/en/help/main/10.2/index.html#//009t00000028000000

Original comment by struktur...@gmail.com on 5 Dec 2014 at 4:04

GoogleCodeExporter commented 8 years ago
Here is the deal: 
From GMapCatcher we download map tiles like:
http://a.tile.openstreetmap.org/17/44279/78976.png
from that (17/44279/78976) we already have formulas to get zoom and 
coordinates(lat,lon) of the upper top corner

All the Image export are of full tiles I do not split them, and each tile is 
(256 x 256px) 
If with that info you can produce the formulas I will be happy to add them for 
you.

But unfortunately I do not have time for all the research, you can contact me 
directly:
heldersepu (at) gmail.com

Original comment by heldersepu on 5 Dec 2014 at 4:38