Jump to content

 
Photo

Map tiles - strange coordinates - need "normal" WGS

- - - - -

  • Please log in to reply
12 replies to this topic

#1
Jan Helebrant

Jan Helebrant

    Contributor

  • Validated Member
  • PipPip
  • 24 posts
  • Gender:Male
  • Interests:GIS, open-source, graphics (both 2D and 3D), multimedia, taking photos
  • Czech Republic

Hi all,
we have some cds with digitized old army maps (called RETM, some should be from NATO sources) - it consist of many seamless tiles - many TIFF files and TFW files defining the coordinates:

2.11506

0.0

0.0

-2.11506

420000

5500000

I searched in the documentation and found this (translated with Google):

Codename segment files are created as follows:

tppxxxxsyyy.tif
tppxxxxsyyy.tfw

where
t - codename RETM
pp - indicates 6 ° UTM meridian strip
xxxx - code coordinate N (North), in relation to the lower left corner of the segment
the marking coordinate system in which the segment was created (there are always w for the northern hemisphere)
yyy code to coordinate E (East), in relation to the lower left corner of the segment

Codename (t) type RETM is as follows:
f RETM 25 ("25" means 1 : 25 000 scale)
e RETM 50
d RETM 100

Marking 6 ° meridian strip (pp) consists of two digits of the band. Zones are numbered from 1 to 60th. Czech Republic is located in the 33rd and 34th zone.

Code for coordinate N, respectively. E (UTM) bottom left corner of the segment is designed so that the plane rectangular coordinates of a corner in meters divided by the actual size of the segment in meters (the RE scale 1: 100 000 by 10 000, RE 1: 50 000 number 5 000, RE 1: 25 000 number 2 500, etc.). If the result coordinates fewer characters, make up the left with zeros.

For example, for segment 50 in the 33rd RETM zone coordinates of the left lower corner:
x = 5 500 000
y = 500 000
5 500 000 / 5 000 = 1100
500 000 / 5 000 = 100
Name of the segment e331100w100.tif
Name e331100w100.tfw text file and the file contains six rows with values:
4.23012 pixel size in meters in the x-axis
0.0 Rotation in row
0.0 Rotation in column
4.23012 pixel size in meters in the y-axis
500,000 E-coordinates of upper left corner
5550000 N-coordinates of upper left corner

The segments are organized into zones. Zone means a coherent set of segments, covering an area of a 6 ° meridian strip. This space is extended to the east and west for an additional two full segments to overlap between adjacent zones is at least two segments.

(hope, that I removed all typos and illogical translations)

I have problem with converting this to something with normal coordinates like X = 14,xxxxxx; Y = 50,xxxxxx common in our country and I did not find any way yet, how to recalculate the coordinates to get "normal" ones.

Manual georeferencing in QGis or SAGA works OK, but it distorts the image (while it should be already projected) and comparison of coordinates from RETM maps and Google maps (which I used for manual georeferencing) does not show any solution.

I would be grateful If someone could give me an advice.

thanks

#2
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,309 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

When you try to display them using the coordinates they come with, can you get them somewhat in the right neighborhood of where you want them to be?
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#3
Jan Helebrant

Jan Helebrant

    Contributor

  • Validated Member
  • PipPip
  • 24 posts
  • Gender:Male
  • Interests:GIS, open-source, graphics (both 2D and 3D), multimedia, taking photos
  • Czech Republic

When you try to display them using the coordinates they come with, can you get them somewhat in the right neighborhood of where you want them to be?


Only by doing georeferencing manually. Then I get points like this:

X 	Y 

420664,58550068	5503405,40579298

433526,01900426	5509738,29854118

434441,54144610	5506773,00510423

424910,84768709	5502165,29165752
for source map and:
X Y

13,90917389	49,67579222

14,07759917	49,73642333

14,09089250	49,70977833

13,95958667	49,66729722
for the projected map. But this is not exactly correct - I cannot get the GPS data for the exactly the same point from the online map browser.

I tried to found some relationship doing some calculation but without success.

I attached some pictures. The menus are in Czech but I think translation is not necessary. There are screenshots of both maps extent (Kosmo call this "envelope" - on picture "Obálka") and also for our area of interest (defined by those 4 points numbered 1-4) where we made our measurements and the map window with both georef. map and vector objects. The raster map does not fit correctly but the position is approximately OK.

When trying to display both maps, I see nothing.

Attached Files



#4
Nick H

Nick H

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 307 posts
  • Gender:Male
  • Location:Caversham, Reading, England.
  • United Kingdom

Taking the example in your first post, you have a raster map called something like 'filename.tif' and a world file called 'filename.tfw'. For one of the maps the TFW world file reads:

2.11506
0.0
0.0
-2.11506
420000
5500000

So the top left-hand corner of the map is at 420000 5500000 and the projection of the map is possibly UTM Zone 33N (EPSG:32633). If the projection really is EPSG:32633 then this coordinate, 420000 5500000, corresponds to about 13.8918062 N 49.6472458 E (WGS84). Could you plot this coordinate in Google Earth to see if agrees with the position of the top left-hand corner of your map?

What I don't understand is why you need to recalibrate the map yourself, all of the calibration details are in the world file and this should be recognised by QGIS, et cetera (the TIF and the corresponding TFW file need to be kept together in the same directory).

Always interesting, these projection puzzles :).

Regards, N.
Caversham, Reading, England.

#5
Jan Helebrant

Jan Helebrant

    Contributor

  • Validated Member
  • PipPip
  • 24 posts
  • Gender:Male
  • Interests:GIS, open-source, graphics (both 2D and 3D), multimedia, taking photos
  • Czech Republic

So the top left-hand corner of the map is at 420000 5500000 and the projection of the map is possibly UTM Zone 33N (EPSG:32633). If the projection really is EPSG:32633 then this coordinate, 420000 5500000, corresponds to about 13.8918062 N 49.6472458 E (WGS84).


I just tested it in Google maps and the coordinates look OK. How did you get them?

What I don't understand is why you need to recalibrate the map yourself, all of the calibration details are in the world file and this should be recognised by QGIS, et cetera (the TIF and the corresponding TFW file need to be kept together in the same directory).


I need to recalibrate it because the software maybe should but in fact does not recognize the projection and setting EPSG:32633 in layer properties does not solve it - I still have those huge X,Y coordinate numbers and not "normal" 13.8918062 N 49.6472458 E. So I am not able to combine it with other materials. I know that the easiest way should be to somehow recalculate coordinates and a data in the world files from for example 420000 5500000 to 13.8918062 N 49.6472458 E (WGS84), but I do not know which formula should I use to do this.

thanks

#6
Nick H

Nick H

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 307 posts
  • Gender:Male
  • Location:Caversham, Reading, England.
  • United Kingdom

Okay, I think I know what you are looking for. You want to be able to load the map into into QGIS (or some other GIS) so that as you move the pointer around the screen the coordinates for the pointer are displayed as WGS84 lat/long degrees? Can you confirm that this is what you want.

To do what (I think) you want will involve 'warping' the map to a new shape. This can be done, but it wouldn't usually be necessary. What is it you want to do with the map, plot GPS tracks or something? Or pick points from the map and save them as lat/long?

Don't even think about trying to change the coordinates in the world file to WSG84 lat/long :o .

Regards, N.
Caversham, Reading, England.

#7
Jan Helebrant

Jan Helebrant

    Contributor

  • Validated Member
  • PipPip
  • 24 posts
  • Gender:Male
  • Interests:GIS, open-source, graphics (both 2D and 3D), multimedia, taking photos
  • Czech Republic

Okay, I think I know what you are looking for. You want to be able to load the map into into QGIS (or some other GIS) so that as you move the pointer around the screen the coordinates for the pointer are displayed as WGS84 lat/long degrees? Can you confirm that this is what you want.


Yes, this is what I need. We have many other datasets - for example airborne measurements data (points made from original text file containing X,Y in 13.xxx 49.xxx format from GPS, height and measured value) - which we need to combine with the map tiles. The same is with our gridded maps - I cannot display them with the topographic map as background.

I thought that the "transformation" involves modifying the world file as all my world files look like this:
0.000055898202244

0

0

-0.000035444162039

14.895540314896413

50.243959625996943

So I thought that it could be done by recalculating the values in the world file as the map is already in the target CRS (same orientation, same relative position between the objects on the map) so I assumed that it needs to change the corner position and maybe also the pixel size. But I do not have much experience with this so I am asking here. :rolleyes:

regards

Jan

#8
ProMapper

ProMapper

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 216 posts
  • Gender:Female
  • Location:India
  • Interests:promapper@gmail.com
  • India

Hi Jan

I hope you have been able to resolve your problem. If not I would love to sink my teeth into it.

Anu
http://www.mapsandlocations.com

Okay, I think I know what you are looking for. You want to be able to load the map into into QGIS (or some other GIS) so that as you move the pointer around the screen the coordinates for the pointer are displayed as WGS84 lat/long degrees? Can you confirm that this is what you want.


Yes, this is what I need. We have many other datasets - for example airborne measurements data (points made from original text file containing X,Y in 13.xxx 49.xxx format from GPS, height and measured value) - which we need to combine with the map tiles. The same is with our gridded maps - I cannot display them with the topographic map as background.

I thought that the "transformation" involves modifying the world file as all my world files look like this:
0.000055898202244

0

0

-0.000035444162039

14.895540314896413

50.243959625996943

So I thought that it could be done by recalculating the values in the world file as the map is already in the target CRS (same orientation, same relative position between the objects on the map) so I assumed that it needs to change the corner position and maybe also the pixel size. But I do not have much experience with this so I am asking here. :rolleyes:

regards

Jan



#9
Nick H

Nick H

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 307 posts
  • Gender:Male
  • Location:Caversham, Reading, England.
  • United Kingdom

Hi Jan

I hope you have been able to resolve your problem. If not I would love to sink my teeth into it.

Anu


Hi Anu, Jan, All,

Just a quick update on this. Jan and I have been talking off-list and I've given him a method for un-projecting and warping his maps from UTM Zone 33N to WGS84. This works, but doing it distorts the maps very badly of course. I've strongly suggest that he does things the other way round, i.e. transform his data to fit the maps rather than the other way round.

Regards, N.
Caversham, Reading, England.

#10
ProMapper

ProMapper

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 216 posts
  • Gender:Female
  • Location:India
  • Interests:promapper@gmail.com
  • India

This works, but doing it distorts the maps very badly of course. I've strongly suggest that he does things the other way round, i.e. transform his data to fit the maps rather than the other way round.

That is probably the best way. Vector conforms to transformation to another projection system without much issues rather than raster data, naturally you can not elongate or shorten pixels so easily. A really good solution.

#11
Jan Helebrant

Jan Helebrant

    Contributor

  • Validated Member
  • PipPip
  • 24 posts
  • Gender:Male
  • Interests:GIS, open-source, graphics (both 2D and 3D), multimedia, taking photos
  • Czech Republic

Ok,
thank you all for you help. After all, this forced me to find out a little bit more about the projections :P

I returned back to my favourite free gis SAGA - System for Automated Geoscientific Analyses where I found projection of shapefiles via Proj4. The dialog was very simple and after choosing the few parameters from menus to:

Proj4 (Shapes)
Direction: Geodetic to Projection
Projection Type: Universal Transverse Mercator (UTM)
Ellipsoid: Predefined Standard Ellipsoids
Predefined Standard Ellipsoids: WGS 84 (a=6378137.0, rf=298.257223563)

I got shapefile with correct shape (I tried it with country regions shapefile). And that map was correctly loaded on the map without any other manipulations necessary. So I will only presuade my colleagues to give me the source table before gridding and I will give them already projected shapefile.

Attached Files



#12
Nick H

Nick H

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 307 posts
  • Gender:Male
  • Location:Caversham, Reading, England.
  • United Kingdom

Hi Jan, pleased to hear that you have managed to get everything sorted-out. It's too late to be of any help now, but I should have mentioned QGIS, which can transform shapefiles and other vector data 'on-the-fly'. So in theory at least it should have been possible to import your UTM Zone 33 raster layers, overlay them with your WGS84 vector layers and have them register properly.

Regards, N.
Caversham, Reading, England.

#13
Jan Helebrant

Jan Helebrant

    Contributor

  • Validated Member
  • PipPip
  • 24 posts
  • Gender:Male
  • Interests:GIS, open-source, graphics (both 2D and 3D), multimedia, taking photos
  • Czech Republic

Dear Nick,
I am trying to reply to this topic a long time, but always forget it :-) I do not know why but my memory is very poor and my PDA does not remind my things that are not written there :rolleyes:

So thank you for your advices. Our final decision in this case is, that I will always reproject our airborne point data into UMT zone 33N as other colleagues have mostly worse GIS experience than I. So it is easier to give them the point data directly in UTM so that they can use them together with that maps (they have different software - one ArcMap, few MapInfo, also one Oasis Montaj - but this is used rarely, and of course my open-source battery - QGIS, Kosmo and SAGA).

Luckily, we have really universal formats like shp, asc and those bitmaps, so we have not big compatibility problems (the only one was, that MapInfo cannot export grids by default, so finally found free MIG Toolbox and now we are able to get ascii grids also from MapInfo ;) )

So many thanks and also wish you happy new year! (my PF card is in attachement)

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->