VS: [UMN_MAPSERVER-USERS] gdal and jgp issues

Rahkonen Jukka Jukka.Rahkonen at MMMTIKE.FI
Tue Dec 13 09:10:03 EST 2005


Hi Frank,
 
The only reason I can imagine is that the image file and corresponding world file do not match for some reason or another.  They should match if they are located in the same directory and filenames are exactly the same, despite extensions. I tried to rename one on my jpeg images to 2001-0048-0107-50.jpg and gdalinfo returned correct information with both as .jgw and .wld named world files. Maybe you should check once again that the names suit and both files are in the same place. But you said that Arc did find the coordinates?
 
Regards,
 
Jukka Rahkonen

________________________________

Lähettäjä: UMN MapServer Users List puolesta: Frank Broniewski
Lähetetty: ti 13.12.2005 14:44
Vastaanottaja: MAPSERVER-USERS at LISTS.UMN.EDU
Aihe: [UMN_MAPSERVER-USERS] gdal and jgp issues



Hello list

I have a problem which is only little related with mapserver, but maybe
someone can help me.

I have orthofotos in tif-format with a worldfile (tfw) and i want them
for transportation reasons (a presentation) to be converted from
tif-format to jpeg-format. I used irfanview to batch-convert all
tif-files into jpg-format. After that, I renamed all tfw-files to .jgw.

After doing so, I tested if everything went well. I added the new
created jpg-files into Arc and they fitted well on to their right place
in the world.
But I want to use the files with mapserver, so I made an additional test
with gdalinfo. But there seems to be a problem, because gdalinfo returns
only the pixeldimensions and not the real world coordinates. I renamed
the .jgw into .wld but this didn't help me either. The converted jpgs
have the same dimension as the tif-images, from whose I get the expected
dimension by the way.

Has anyone an idea whats going wrong?



for clarification reasons, here is the gdalinfo output:

c:\karten\cds\cadastre\ortho_lowres>gdalinfo 2001-0048-0107-50.jpg
Driver: JPEG/JPEG JFIF
Size is 2000, 2000
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 2000.0)
Upper Right ( 2000.0,    0.0)
Lower Right ( 2000.0, 2000.0)
Center      ( 1000.0, 1000.0)
Band 1 Block=2000x1 Type=Byte, ColorInterp=Red
  Min=0.000/0, Max=255.000/0
Band 2 Block=2000x1 Type=Byte, ColorInterp=Green
  Min=0.000/0, Max=255.000/0
Band 3 Block=2000x1 Type=Byte, ColorInterp=Blue
  Min=0.000/0, Max=255.000/0


And here is the output from the tif-file:

c:\karten\cds\cadastre\ortho>gdalinfo 2001-0048-0107-50.tif
Driver: GTiff/GeoTIFF
Size is 2000, 2000
Coordinate System is `'
Origin = (48000.000000,107000.000000)
Pixel Size = (0.500000,-0.500000)
Corner Coordinates:
Upper Left  (   48000.000,  107000.000)
Lower Left  (   48000.000,  106000.000)
Upper Right (   49000.000,  107000.000)
Lower Right (   49000.000,  106000.000)
Center      (   48500.000,  106500.000)
Band 1 Block=2000x1 Type=Byte, ColorInterp=Red
  Min=0.000/0, Max=255.000/0
Band 2 Block=2000x1 Type=Byte, ColorInterp=Green
  Min=0.000/0, Max=255.000/0
Band 3 Block=2000x1 Type=Byte, ColorInterp=Blue
  Min=0.000/0, Max=255.000/0
                                                     
Frank Broniewski
Musée National d'Histoire et d'Art
Section Préhistoire / Projet EPC
    Tél: +352 260 281-21
241, Rue de Luxembourg
L-8077 Bertrange



More information about the mapserver-users mailing list