TileCutter update – With support for OSM and WMS map services
I just added support for creating MBTiles caches for WMS map services and also to download OSM tiles into the MBTiles format. MBTiles cache for WMS map services would improve map rendering performance, but why did i add support for OSM tile sets? Well, they will come in handy for disconnected/offline use cases. So, here are some usage examples
ArcGIS Dynamic Map Service:
TileCutter.exe -z=7 -Z=9 -x=-95.844727 -y=35.978006 -X=-88.989258 -Y=40.563895 -o=”C:\LocalCache\ags.s3db” -t=agsd -m=”http://server.arcgisonline.com/ArcGIS/rest/services/I3_Imagery_Prime_World_2D/MapServer”
WMS Map Service 1.1.1:
TileCutter.exe -z=7 -Z=9 -x=-95.844727 -y=35.978006 -X=-88.989258 -Y=40.563895 -o=”C:\LocalCache\wms111.s3db” -t=wms1.1.1 -m=”http://sampleserver1-350487546.us-east-1.elb.amazonaws.com/ArcGIS/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer”
WMS Map Service 1.3.0:
TileCutter.exe -z=7 -Z=9 -x=-95.844727 -y=35.978006 -X=-88.989258 -Y=40.563895 -o=”C:\LocalCache\wms130.s3db” -t=wms1.3.0 -m=”http://sampleserver1-350487546.us-east-1.elb.amazonaws.com/ArcGIS/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer”
OSM:
TileCutter.exe -z=7 -Z=9 -x=-95.844727 -y=35.978006 -X=-88.989258 -Y=40.563895 -o=”C:\LocalCache\osm.s3db” -t=osm -m=”http://tile.openstreetmap.org”
And always just type “TileCutter -h” for usage information.
Want to customize the parameters with which the maps are being generated? Just use the “-s” command line option ans specify the setting in a query string format.
TileCutter.exe -z=7 -Z=9 -x=-95.844727 -y=35.978006 -X=-88.989258 -Y=40.563895 -o=”C:\LocalCache\ags.s3db” -t=agsd -m=”http://server.arcgisonline.com/ArcGIS/rest/services/I3_Imagery_Prime_World_2D/MapServer” -s=”transparent=true&format=jpeg”
Also, if some of the tile requests result in errors, the level, column, row and error message information would be logged into a text file in the same directory as the MBTiles cache.
And now, for the best new feature of TileCutter, the program does not store duplicate tiles. That is, if the area you are caching has a lot of empty tiles in the ocean etc, the MBTiles cache created by TileCutter will only store one tile for all those duplicated tile images. Should help save disk space 🙂
[…] MBTiles cache files at the same time if needed. And also, you can create MBTile caches with the TileCutter. The viewer was created using the ESRI WPF map control. If you would like to see this viewer do […]
Greetings Vish,
Many thanks for the awesome tool.
One request: could you please add an option to enable the possibility of tilecutting a local image file as well?
I have a lot of raster map files sitting on my hard-drive waiting to be batch converted into MBTiles format.
A scriptable executable like tilecutter.exe would work great….maybe it’s already out there somewhere already…still looking.
Thanks again,
Free World Maps
Vish, this is an awesome tool. As a new feature though, would it be possible to regions at different zooms. Say the entire globe at zooms 1 – 5, but a smaller portion at 6 – 10? I tried to take to mbtiles databases and merge them with the dump command as found on github, but it throws error saying the primary key isn’t unique. So any ideas or tips would be appreciated.
Hi Vish, thanks a lot for this tool . It is great.
I am always getting a 404 error when trying to get tiles from opentreetmaps , even with the sample script:
Error while downloading tile Level:7, Row:51, Column:-34078062 – The remote server returned an error: (404) Not Found..
Thanks again and regards
Can u post the command u are using?
Thank You,
Vish
Thanks for your answer. I have tried too with your usage sample and getting the same error:
TileCutter.exe -z=7 -Z=9 -x=-95.844727 -y=35.978006 -X=-88.989258 -Y=40.563895 -o=”C:\LocalCache\osm.s3db” -t=osm -m=”http://tile.openstreetmap.org”
It works perfectly with arcgis.
Thanks again .
I get the following error using the examples: ‘The tilecache path provided is not valid’
The local path does exist. Any thoughts?
Thanks
Getting the same error as Mike. Any suggestions? Thanks!
One great addition would be to be able to extract existing tiles from an arcgis tiled service…
Thanks!
Looks like we need to create a SQLite database file first? I get the tilecache path provided is not valid. It has a file name it it “ags.s3db” and I assume that needs to be the database? Looks like a great utility once I get it running. Thanks!
Hi vish! Is the source open?
Yes it is. https://code.google.com/p/tilecutter/
Vish
Reblogged this on osedok.