How to pull crs information from a world file when reading an image using python GDAL or Rasterio? The images I am reading to not have in built metadata, it is stored in the projection file (.prj) and world files (.tfw or .jpw for tiff and jpg files, respectively). When I read these images using python GDAL or Rasterio, it ignores these metadata files and therefore does not read any coordinate metadata.
How would I go about reading these files?
Edit 1. Code example: Using python 2 (Anaconda distribution). I want to read an image file and get it's bound box.
image1.prj image1.jgw image1.jpg import rasterio img = rasterio.open('image1.jpg') bounds = img.bounds crs = img.crs transform = img.transform
When the code is run, the following warning appears:
C:\Anaconda2\lib\site-packages\rasterio\__init__.py:193: UserWarning: Dataset has no geotransform set. Default transform will be applied (Affine.identity())