2

I'm converting PNG file to GeoTIFF. Here's the setup that I use in FME:

PNGRaster -> 
    RasterExtractor -> 
        CoordinateSystemSetter -> 
            RasterGeoReferencer -> 
                writer

The settings of RasterGeoReferencer:

enter image description here

But when I try to upload the map to mapbox I get an error: Invalid pixelsize in geotransform array. What is wrong?

wittich
  • 2,356
  • 1
  • 16
  • 30
  • Is the screenshot showing the coordinates you fill in? 'caus 1 and 2 are not the "best" coordinates ;-) ... – wittich Jan 23 '16 at 17:03
  • well it shouldn't matter, right? I used coordinates that describe range from 0,0 to 10,10 but still had the same error – Oleg Filimonov Jan 23 '16 at 17:23
  • For me it looks like that that tool doesn't use the coordinates from the PNG but the one you enter manually?! Did you try to open the PNG as well as the converted GeoTIFF in a GIS software (eg. QGIS) to see if it is correct georeferenced? – wittich Jan 23 '16 at 17:32
  • I can open output with QGIS, I also tried exporting geoTIFF from QGIS and got a new error: Error: bounds south value must be between -95 and 95 – Oleg Filimonov Jan 23 '16 at 17:40
  • And the outputs in QGIS has the right position? Add some basemaps to check that. My guess, it is a matter of the projection/coordinates system. Make sure that you GeoTIFF output has the right one for the mapbox, – wittich Jan 23 '16 at 17:51
  • Maybe there is an easier way to convert raster image to a geoTIFF with WGS 84 / Preudo Mercator coordinate system using QGIS instead of FME? – Oleg Filimonov Jan 23 '16 at 17:59
  • Just out of interest, what is the RasterExtractor for? I don't see the point of it (although it won't be doing anything that would affect your output here) – Mark Ireland Jan 25 '16 at 20:09
  • Are you sure you have those coordinates the right way around? i.e. you have upper-left = 1,1; lower-left = 1,2 (seems to me that should be lower-left=1,1; upper-left=1,2) I'm not convinced I'm reading that right, or that it would cause a problem even so, but it just looks wrong to me. – Mark Ireland Jan 25 '16 at 20:16

1 Answers1

2

I can't answer really your question but I can tell you how to convert a georeferenced PNG to a GeoTIFF using QGIS.


Method 1:

  1. add the raster layer to QGIS Layer -> Add Raster Layer...
  2. right click on the feature and click on Save as... save as
  3. chose the filename and selected the correct Coordinate Reference Systems (CRS, eg. EPSG:4326) and click okay. save raster alyer

Method 2:

Another option is the Translate tool: Raster -> Conversion -> Translate (Convert format)

qgis translate

wittich
  • 2,356
  • 1
  • 16
  • 30