Generate XYZ Tiles on Openstreet Map using QGIS or Maperitive getting bad Images - openstreetmap

I have already done Generate XYZ Tiles with layout png format using QGis only zoom level 14 in 10 days.
All image already done 100% thats showup on QGis percentage, but some images become blank or black image.
maybe it was fail when render like bad connection or anything else.
Can i render specific image only that blank image but not 1 by 1.
I dont want wasting time 10 days anymore.
Last i trying another application similiar on zoom 13 with Maperative
But the result is same.

Seems like you have got trouble with your connection or bandwidth osm same like me.
The only solution is download manually, one by one, from the official site, each image.
https://tile.openstreetmap.org/1/1/1.png
Save that image on your folder z x y structure in your blank tiles.

Related

How should we display GeoPackage on Mapbox GL JS?

We used wgrib2 to convert weather radar data into NetCDF format. We converted it to GeoPackage format using gdal_translate. We created a Color Map on QGIS 3.10 and the GeoPackage appeared as expected.
We would like to display this on the Internet using these files or processed versions of these files. We have Mapbox GL JS as a candidate for that but it is not required. We have not found a way to display the gpkg files we have generated. How can we get it to display?
https://docs.mapbox.com/mapbox-gl-js/guides/
We generated png images using gdaldem color-relief and we also tried the following method
However, when we zoomed in on the map with this method, the quality of the image was rough and it could not be displayed beautifully.
https://docs.mapbox.com/mapbox-gl-js/example/image-on-a-map/
Since the gpkg we generated displays correctly in QGIS, it would be most desirable to be able to display the gpkg on MapBox. However, if that is not possible, we would like to display that data beautifully, even in another format.
We also tried to generate tiles using gdal2tiles.py. It worked as we expected when we created data up to zoom level 10. However, when we created the data for zoom level 11, it took more than 12 minutes. Since our data is generated every 5 minutes, we cannot spend any more time on tile generation.
Mapbox GL JS specialises in displaying vector tiles, but can also display raster tiles. If you can't generate static raster tiles from your GeoPackage data source (because they're too big and change too fast), you'll need some kind of server that can read GeoPackage and serve up raster tiles on demand.
Running GeoServer would be one way to do that. It supports GeoPackage natively and could serve up the requested tiles without having to generate them all in advance.
There is also a NetCDF extension that might let you skip the GeoPackage conversion step.
(What you tried was generating a single raster image, which was probably insufficiently detailed for your needs).

Image getting stretched when creating MBTiles using TileMills to use as an Image on Whirly Globe Framework

I am struck with issue .
I want to use My personal Image as an image on whirly globe.I used a Jpeg file and changed into .tiff file and added to Tile Mills as a Layer (Following the rules specified in the crash course of tile mills).Now i am facing an issue while exporting the image as MbTiles .
I looked into this Link for taking reference on what should be 'Dimensions' of the image to be used on whirly globe.
Right now i have an image whose dimensions are 10184X7638. But this image is not able to wrap the complete Whirly Globe.
Please guide me on
what the dimensions should be there of the image to be used for whirly globe.
can i use this values while creating a frame for the image as the image gets strected when is added to the globe .Image1
.
This is the Image i am talking about it has a dimensions of 10184 X 7638 pixels and when i select these bounds as specified Image1 (-180,-85.11,180,85).then i get this Image2
. Here you can see the image is not able to cover the complete bounds and hence the globe also is not fully wrapped with this image.
Thanks!!
The image is less about dimensions and more about mapping it to geographic coordinates so that it can completely cover the globe. You need to make sure the image takes up your whole TileMill map if you want it to completely cover the globe in WhirlyGlobe.

images get cropped in the generated presentation

i am using open xml sdk to copy slides into another presentation , when the slides are copied and my desired presentation is generated , I iterate through each slide of the generated document and replace its existing images with the image of my choice , the process is executing and the images gets replaced , but here is the bind , if the dimensions of my images are larger then the image in the document , the image gets cropped to fit to the size that was previously occupied by the replaced image .But if i do the whole process manually , by right clicking with my mouse , power point changes the dimension of the image its get shorter but its not cropped and the whole image is displayed ...
so what approach should i go for , do i have to change some xml settings through code , or do i have to change the dimension of my images using c# classes , what is the right approach to tackle this issue???
guys i will be anxiously waiting for your response ......
Better change the image before replacing the image in your target presentation file. As power point is going to embed your image in the file itself, you can reduce the size of the overall generated file if you compress the images to required dimensions before replacing.
Changing the dimensions in the xml is also a valid idea but you are embedding images into the file without any added advantage.
Some pointers on how to resize image in c# :
https://stackoverflow.com/a/87786/860243
http://www.peterprovost.org/blog/2003/05/29/Resize-Image-in-C/
http://dzone.com/snippets/c-resize-image-while

Anyway to overcome the 5 custom icon urls per request?

From the Google Image API documentation
Static Maps service allows up to five unique custom icons per request. Note that each of these unique icons may be used multiple times within the static map
I have more than 5 custom icons per request, maybe up to 40.
Is there a way to overcome this? Is it possible to use sprites in static maps to overcome this?
Here's how I got around this:
You probably already know how, and depending on your source it's going to be different anyway, but collect up all your map data. Required bits are going to be: center point, zoom, map type, and output image size. I am going to assume sensor (if the application has access to GPS) is false. Also you are going to need all of your marker information which will include the icon you are going to use, and the geo coordinates of them.
I POSTed this all to the CF page that is going to make all the magic happen.
Map your first 5 points as normal. Get the results as a .png
Map your next 5 points but add "style=feature:all|visibility:off" to the query string, get result as a .png. This will give you a png with a transparent background but will have all of your marker icons on it. It will be the same size as your initial map, and the markers will be placed correctly withing that rectangle.
Watermark that image on top of your initial map. NOTE: this step is probably going to vary the most depending on your language of choice and what image manipulation features it offers.
Repeat 4 and 5 until you have all of your markers.
Write out you image with all of the markers now on it.
Serve up a link to that file instead of using the normal google link.
I have a more detailed explanation here with some code example in ColdFusion.

HUGE image to show on the iPhone

Ok, here's my problem. I have a HUGE jpg file, 18000 x 18000 pixels 41MB in size.
If you really need to know, it's a map of a section of the country with services.
My project is really simple. I just need to be able to zoom and display this granddaddy size image. All the way from aspect fit to 100% on the iPhone. I'm not too sure if this can be done or how long it will take. Would appreciate any insights.
I have tried using imageView but I read that it really shouldnt exceed 1024 x 1024. That is way below what I have. If you have an idea how to go about doing this, please share!
You should split the image into tiles, at a range of magnifications. Calculate and build these off-line, and ship them as individual files in the app bundle. Given the zoom in your display, pick the closest zoom size. You then select which tiles are needed to cover the screen, and make a grid of them. As the user zooms, select the appropriate tile size.
The benefit of this is that you don't ever have to load HUGE files into memory, only as much as needed.
This is how Google maps does it.
Can't give you any code, sorry!
You should follow an approach similar to what Google Maps and other map sites do. You need to slice the whole map in sections, so the users don't need to load the whole map if it's not always necessary (plus makes loading time way faster)
There's a couple of solutions that might work for you like OpenLayers or even creating a Custom Google Map with your images as seen here and here
Here is an example from Apple for processing large images called PhotoScroller. The images have already been tiled. If you need an example of tiling an image in Cocoa check out cimgf.com