Skip to content

Raster prediction output Affine transform y is positive, not negative #125

@bluetyson

Description

@bluetyson

here's an output from the other day:-

with rasterio.open(r'F:\'RFNoNaN074_prediction.tif') as src:
    print(src.meta)
{'driver': 'GTiff', 'dtype': 'float32', 'nodata': -1.0000000200408773e+20, 'width': 1322, 'height': 1596, 'count': 1, 'crs': CRS.from_epsg(3107), 'transform': Affine(1000.0, 0.0, 339300.0,
       0.0, 1000.0, 1136900.0)}

with rasterio.open(r'F:\SA_GRAV.tif') as src2:
    print(src2.meta)
{'driver': 'GTiff', 'dtype': 'float32', 'nodata': -99999.0, 'width': 1322, 'height': 1596, 'count': 1, 'crs': CRS.from_epsg(3107), 'transform': Affine(1000.0, 0.0, 339300.0,
       0.0, -1000.0, 2732900.0)}

Noticed this when an output was read into ER Mapper. Thought maybe an oddball project thing as fine in QGIS and Arc.

However, Raster in R - same problem, so definitely the raster.

Then I checked, as above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions