Problem in feature filling when exporting maps to image in Qgis Print Composer - maps

I am currently trying to export a map in Qgis to an image format (JPEG or PNG) using the Print Composer. I have three layers on the map and two of them are filled with a texture (lines for South America and dots for Africa and Asia). When looking inside the Qgis fillings seem just fine. However, when I export the map to image format and open it both lines and dots somewhat mingle and the fillings become blurred. Only when I zoom in enough the lines and dots become distinct again. I did some internet research, but I could not find anything useful. Is there a way to export the map to image format and yet keep the fillings similar to what is displayed inside the Qgis?
Thank you.

Related

Mapbox raster image not working in mobile

In mobile view mapbox renders black image instead of raster image. I suspect this is because of the size of image(3.9 MB), also this is happening mostly on chrome browser for mobile. Please help me find the potential issue here?
This sounds as if you could be running into the No-Data issue, when rendering transparency.
The black background that appears is the part of the raster image that does not contain any data. Generally a raster image is a rectangular grid of pixels. When you are working with data that is not rectangular, there are pixels within the grid that don't contain any data. These pixels are expressed as NoData values and represent the absence of data. GeoTIFFs that are uploaded to Mapbox Studio are displayed as JPEG to save space and make maps load quickly. Since JPEG cannot display transparency, NoData values appear black.
Please see this documentation on how to resolve this:
https://docs.mapbox.com/help/troubleshooting/raster-transparency-issues/#why-black-backgrounds-appear

How to load a open street map from local source?

I'm using the wpf map control of DevExpress 15.1.5 and I'm trying to load a map from a local source.
DevExpress's help allows me to download a .osm file of a selected map area by me, but I can not load a .osm with this control; it only supports .kml and .shp.
What can I do?
You need to download map data in a different format, see. :
OpenStreetMap data
I recommend the first download a small country and try it if that's what you need.
Map consists of multiple layers, which together form "what you see". Layers are buildings, roads, places, waterways,landuse ... and are formed by shapes *.shp file (eg. Building plan, the route of the road ...)
You can view video here:
https://www.youtube.com/watch?v=4vlEzX9Q15Y&t=6s
also the source code is available in github.
the Control works on local OSM tiles
it is written in C#
I created OSM MAP Control which have the following functionalities:
1. Accurate Zoom with the mouse wheel.
2. Move left , up ,bottom and right
3.if tiles are missing , it ask to start download those missing tiles.
4. Create line on the map
5.save history by friendly name
6. you can download area of tiles - with zoom.

GIMP: Animated GIF not White

I exported a bunch of png files from R. The pictures are of a dataset that is 'spinning' against a white background. I then use GIMP to stitch them together and export an animated gif. Unfortunately, the gif has a yellowish color instead of a white background like the original files. This yellowish color was not there when I used to do this in imageMagick and isn't even there when I preview the files in GIMP. It only appears after I do the export as a gif. Does anybody know what is going on and how I can correct this?
GIF files are limited to 255 colors. If you don't downsacle colros prior to exporting them, GIMP will do that automatically at the export step itself. It is at this point that your yellowish background is being created.
The workaround is quite simple: convert your image to the indexed color model before exporting the GIF file (image->mode->indexed) ( perceive you could even force a custom crafted palette at this step). If after this conversion the backgroound is already yellowish, you can manually redefine it on the Color Map dialog (search for it on the Windows->Dockable menu) - pick the background color, and change it for white.
When exporting the Indexed image to an animated GIF there is no color conversion step, and the colors of the GIF are saved as they are seen on the screen
The issue here is GIMP is trying to do its best to convert your image down to 255 colors, and that is where it is failing. What I recommend for people on OSX is to get this program called ImageAlpha (it is free) https://pngmini.com/. It does a very good job and compressing png images without much loss. If anybody has a recommendation for a Windows app that would do this, please post it here for reference.

Store large image

I'm looking for a way to store a very large image (e.g. 100.000x100.000 pixels) on a webserver. I must be able to retrieve parts of that image and write parts into it. The cherry on top would be a way to get parts of that image, resized to a specific resolution (for example, i want alle pixels from 0,0 to 10.000,10.000 resized to 1000x1000 pixels).
Anybody know a kind of DB, or a data-structure or any other way or service or programm that can handle something like that?
thx, tux
How about Tiles?
Just like what popular mapping application (Google Maps / Bing Maps ) does. Divide and pre-process your image in to tiles for various sizes (zoom levels). Display them on a webpage with zero margin, zero border.
While retrieving, calculate positioning of tiles (which tiles should be retrieved as whole and which ones as partial) and then return as single image.
http://143.117.54.5/idl/images/img_pyrm.gif
(image ack: http://143.117.54.5/idl/Image_Tiling.html)
Search for "map servers": there are a bunch of them already available. I'm sure they at least contain components that might be of interest for you.

Get path geometry from image

If i have a logo, let's say done as a jpg or even a png. Any suggestion for how I can use that to define a path geometry? It would be really good if any suggestions could be provided for how i can do it in blend.
Thanks
Yes - I just tackled this problem for an LOB application two days ago.
I can't offer advice for Blend (though I've read that it can be done in Expression Designer). However, the best free tool I've found for this is called InkScape (http://www.inkscape.org).
It's opensource, and while it's intended primarily for editing SVG vector-based images, it has two key features that are useful to us WPFers:
It can vectorize (i.e. "trace") raster images like bitmaps and jpegs, albeit not as well as one would hope, and
It can export the vector image as XAML
You'll invariably find that you get better results from loading vector formats (like SVG, EMF, WMF, etc) and saving to XAML, than if you try to convert a bitmap/jpeg... simply because the process of vectorizing a raster image is error prone at best. So if you want to bring a company logo into XAML, try to get hold of the source files used to create the logo (perhaps done in Illustrator?) and import that into InkScape.
If this post is helpful, please be kind and give it a one-up.
Jasema is a terrific tool right for the job.
Also, don't be shy to use Blend - it is somewhat more difficult to use (drawing shapes using pen) but it gets easier pretty fast. Switch on gridlines and optionally snap to them for good results.
What both Jasema and Blend are lacking, is the ability to easily create shapes with a central symmetry (like stars), so I took parts from Jasema and created my own tool (named Radius) that works a bit like a combination of a ruler and compass.
I have a good idea but you're png, bmp, jpg or other non vector file is must be very simple because we need best scan results and only use inkscape.
Step: Drag and drop your file workspace on Inkscape, download free.
Tip: If your image is color white, Top menu item File->Document Properties-> heck Checkerboard Background and if you want uncheck Page border show.
Step: Top menu item Path-> Trace Bitmap-> Mode check what you want property, i usually use color property and if your file is png check Remove Background then click OK, then wait again Ok button is Enable and close window.
Step: Now you have a two layer, top layer vektor file and bottom layer your file. Select vector file and top menu item Edit-> XML Editor-> select svg path and look side column, d name propery in your data path value.
But this method may not always work or may not give the desired results and draw your own shapes with the scape so you can get the path data from the XML editor.
Example, my first tests this like:
and after working on it some more:
I've solved my problem (export an image as XAML) using Microsoft Expression Design 4 (Free Version). I've downloaded from the link
http://www.microsoft.com/en-us/download/confirmation.aspx?id=36180
As input, I had Adobe Ilustrator files.
Adobe Illustrator / CorelDraw is perhaps the best tool out there for these operations that I have used.
Personally, I prefer illustrator for on-screen media. These tracings can be exported into several formats such as EPS, SVG, AI, or even XAML (with this plugin)
Best of Luck !!!!
I have recently been struggling with this myself. I had a set of icons done in data and needed to update them to look nicer.
I tried everything, manually typing them out. drawing in svg, converting svg to xaml.
in the end i found a list of open source icons from google material icons.
I then used this to convert from the svg files to data
https://github.com/BerndK/SvgToXaml
It works well but not for the icons i drew myself.
I decided to place all the icons data i convert into an app i built myself that will give you the data and a preview of the icon. feel free to use and contribute. I will keep updating as much as i can.
https://github.com/sgreaves1/XamlIcons
Convert your image from png to svg in online converter, then drop file into this site http://inloop.github.io/svg2android/ and you will see pathData of your image like below shown in my image.

Resources