You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I note this issue has already been raise at : #22 however in that case it was for a ,png with no projection data/EPSG number embedded.
I am encountering the same error trying to run on a geotiff which gdal info shows has spatial referencing:
my command is:
gdal2mbtiles -v masked.tif masked.mbtiles --min-resolution=7 --max-resolution=8
Traceback (most recent call last):
File "/home/nev/.local/bin/gdal2mbtiles", line 11, in
load_entry_point('gdal2mbtiles==2.1.2', 'console_scripts', 'gdal2mbtiles')()
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/main.py", line 309, in main
colors=colors, band=band)
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/helpers.py", line 194, in warp_mbtiles
validate_resolutions(resolution=dataset.GetNativeResolution(),
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 497, in GetNativeResolution
dst_ref = self.GetSpatialReference()
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 463, in GetSpatialReference
sr = sr.FromEPSG(sr.GetEPSGCode())
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 799, in FromEPSG
s.ImportFromEPSG(code)
File "/usr/lib/python2.7/dist-packages/osgeo/osr.py", line 797, in ImportFromEPSG
return _osr.SpatialReference_ImportFromEPSG(self, *args)
TypeError: in method 'SpatialReference_ImportFromEPSG', argument 2 of type 'int'
the gdalinfo on the file returns:
Driver: GTiff/GeoTIFF
Files: masked.tif
Size is 3620, 2530
Coordinate System is:
PROJCS["unnamed",
GEOGCS["unnamed ellipse",
DATUM["unknown",
SPHEROID["unnamed",6378137,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Mercator_2SP"],
PARAMETER["standard_parallel_1",0],
PARAMETER["central_meridian",0],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (15660855.904725419357419,-4021344.132019802927971)
Pixel Size = (289.432029319978540,-286.592914214417760)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (15660855.905,-4021344.132) (140d41' 1.90"E, 33d56'39.98"S)
Lower Left (15660855.905,-4746424.205) (140d41' 1.90"E, 39d10'21.33"S)
Upper Right (16708599.851,-4021344.132) (150d 5'45.26"E, 33d56'39.98"S)
Lower Right (16708599.851,-4746424.205) (150d 5'45.26"E, 39d10'21.33"S)
Center (16184727.878,-4383884.169) (145d23'23.58"E, 36d36'10.04"S)
Band 1 Block=3620x1 Type=Byte, ColorInterp=Red
Band 2 Block=3620x1 Type=Byte, ColorInterp=Green
Band 3 Block=3620x1 Type=Byte, ColorInterp=Blue
The text was updated successfully, but these errors were encountered:
Hi sorry your having trouble, ad sorry for the delayed reply, issues on this repo have slipped past us.
I dont think your geotiff does have a geometry. I notice: PROJCS["unnamed", GEOGCS["unnamed ellipse", DATUM["unknown",
I note this issue has already been raise at : #22 however in that case it was for a ,png with no projection data/EPSG number embedded.
I am encountering the same error trying to run on a geotiff which gdal info shows has spatial referencing:
my command is:
gdal2mbtiles -v masked.tif masked.mbtiles --min-resolution=7 --max-resolution=8
Traceback (most recent call last):
File "/home/nev/.local/bin/gdal2mbtiles", line 11, in
load_entry_point('gdal2mbtiles==2.1.2', 'console_scripts', 'gdal2mbtiles')()
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/main.py", line 309, in main
colors=colors, band=band)
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/helpers.py", line 194, in warp_mbtiles
validate_resolutions(resolution=dataset.GetNativeResolution(),
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 497, in GetNativeResolution
dst_ref = self.GetSpatialReference()
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 463, in GetSpatialReference
sr = sr.FromEPSG(sr.GetEPSGCode())
File "/home/nev/.local/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 799, in FromEPSG
s.ImportFromEPSG(code)
File "/usr/lib/python2.7/dist-packages/osgeo/osr.py", line 797, in ImportFromEPSG
return _osr.SpatialReference_ImportFromEPSG(self, *args)
TypeError: in method 'SpatialReference_ImportFromEPSG', argument 2 of type 'int'
the gdalinfo on the file returns:
Driver: GTiff/GeoTIFF
Files: masked.tif
Size is 3620, 2530
Coordinate System is:
PROJCS["unnamed",
GEOGCS["unnamed ellipse",
DATUM["unknown",
SPHEROID["unnamed",6378137,0]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Mercator_2SP"],
PARAMETER["standard_parallel_1",0],
PARAMETER["central_meridian",0],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (15660855.904725419357419,-4021344.132019802927971)
Pixel Size = (289.432029319978540,-286.592914214417760)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left (15660855.905,-4021344.132) (140d41' 1.90"E, 33d56'39.98"S)
Lower Left (15660855.905,-4746424.205) (140d41' 1.90"E, 39d10'21.33"S)
Upper Right (16708599.851,-4021344.132) (150d 5'45.26"E, 33d56'39.98"S)
Lower Right (16708599.851,-4746424.205) (150d 5'45.26"E, 39d10'21.33"S)
Center (16184727.878,-4383884.169) (145d23'23.58"E, 36d36'10.04"S)
Band 1 Block=3620x1 Type=Byte, ColorInterp=Red
Band 2 Block=3620x1 Type=Byte, ColorInterp=Green
Band 3 Block=3620x1 Type=Byte, ColorInterp=Blue
The text was updated successfully, but these errors were encountered: