1

I have a BMP-picture and I know that it's top left corner has the EPSG:3068 coordinates 35500,24390. I would like to use gdal_polygonize and than calculate the EPSG:3068 coordinates of the produced polygons. But for that I need gdal_polygonize to assume that the top left corner is (0,0) or I need to know at which pixel the actual (0,0) is. gdalinfo of the picture:

Driver: BMP/MS Windows Device Independent Bitmap
Files: E8256.bmp
Size is 8250, 4090
Coordinate System is `'
Origin = (-1890.000000000000000,1890.000000000000000)
Pixel Size = (3780.000000000000000,-3780.000000000000000)
Corner Coordinates:
Upper Left  (   -1890.000,    1890.000)
Lower Left  (   -1890.000,-15458310.000)
Upper Right (31183110.000,    1890.000)
Lower Right (31183110.000,-15458310.000)
Center      (15590610.000,-7728210.000)
Band 1 Block=8250x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
    0: 0,0,0,255
    1: 128,0,0,255
    ...

as you can see the top left corner is -1890,1890. I want that to become 0,0 OR to know at wich pixel 0,0 is. (Pixel size is the length of 1 pixel in coordinates right?)

1

I used gdal_translate -a_ullr 0 0 8250 4090 -of "BMP" source.bmp target.bmp which solved the problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.