Closed LeonanCarvalho closed 6 years ago
As per the documentation vipsCC is not installable via pip. Neither is gdal.
yum install vips-python gdal-python
should work, but I'm not a CentOS user, so can't promise too much. Maybe somone else can advice?
I already had all the other requirements installed, however I did not mind the vps.
To install it on CentOS (fedora, red hat etc) you should use remi repository:
Download the latest remi-release rpm from http://rpms.famillecollet.com/enterprise/7/remi/x86_64/ Install remi-release rpm: rpm -Uvh remi-release*rpm Install vips-python rpm package: yum --enablerepo=remi install vips-python
Cool that it worked out.
If you want/have time to, we would love a PR of the steps necessary on a red hat based system to the Readme. We are kind of ubuntu people over here, so it would be great to get it from someone that knows the system.
As soon as I had a positive return of the installation I contribute to your project, however there are still problems:
Traceback (most recent call last):
File "/usr/bin/gdal2mbtiles", line 11, in <module>
sys.exit(main())
File "/usr/lib/python2.7/site-packages/gdal2mbtiles/main.py", line 283, in main
colors=colors, band=band)
File "/usr/lib/python2.7/site-packages/gdal2mbtiles/helpers.py", line 199, in warp_mbtiles
zoom_offset=zoom_offset)
File "/usr/lib/python2.7/site-packages/gdal2mbtiles/helpers.py", line 67, in image_mbtiles
pyramid = preprocessor(**locals())
File "/usr/lib/python2.7/site-packages/gdal2mbtiles/helpers.py", line 303, in upsample_after_warp
resolution = pyramid.dataset.GetNativeResolution()
File "/usr/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 478, in GetNativeResolution
dst_ref = self.GetSpatialReference()
File "/usr/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 446, in GetSpatialReference
sr = sr.FromEPSG(sr.GetEPSGCode())
File "/usr/lib/python2.7/site-packages/gdal2mbtiles/gdal.py", line 780, in FromEPSG
s.ImportFromEPSG(code)
File "/usr/lib64/python2.7/site-packages/osgeo/osr.py", line 683, in ImportFromEPSG
return _osr.SpatialReference_ImportFromEPSG(self, *args)
TypeError: in method 'SpatialReference_ImportFromEPSG', argument 2 of type 'int'
any try?
I was able to reproduce your problem.
It's most likely due to that when installing gdal on Centos 7, you get a newer version than most other distributions. Something is not working properly because of that (as far as we can tell). Someone will have a look at it, but I can't promise when.
In the meantime, you should be able to work around it by warping the input file to whatever projection you want (for webbased maps it's usually EPSG:3857) and telling gdal2mbtiles
to use the specific projection, thus skipping the warp step like so: gdal2mbtiles --spatial-reference 3857 <input> <output>
.
Also, if you have access to a system running a debian based system, it should work out of the box.
Hope this helps and thanks for your interest in gdal2mbtiles.
I got this erro when install it using pip. on CentOS7