Getting country boundaries - actionscript-3

I have this map
I managed to extract each country in different png file and I made this map by using AS3 code to place each country in its own place. It works properly but there is one thing I don't like and that is the quality of the images. You clearly see gaps between some countries and some borders are thicker than others. That is because I did the extraction with free hand.
Is there a way to get more clear boundaries with code and export the result in png file for each country?
Maybe using some map services like Google maps?

I would recommend you to use vector images instead; you can find some in the SVG format (easily convertible) on Wikipedia:
http://upload.wikimedia.org/wikipedia/commons/b/b3/Blank_map_of_Europe.svg
Each <path></path> node in the file refers to a country, where the id attribute contains the country code and the d attribute is the path in the SVG format.

Related

How to create a geojson file from an image overlay?

I am looking for a way to create a geojson file from the distributions of the health sectors in my region which are different than any political division readily available on osm:
There are fantastic tools such as geojson.io to draw custom polygons but because of the complexity I would need a tool that allows me to overlay an image to use it as a template or that does this automatically. If this makes a difference, I may be able to extract the silhouette with any computer vision library but my problem of how to get from an image or shape to geojson still remains.
Which is the fastest way to approach this?
You can do this using QGIS with manual georeferencing in order to assign real-world coordinates to an image without geo-information. This is done by clicking points on a map that correspond to points on your image. Then once georeferenced you can export the file as a geojson.
Another solution is to find a shape file (maybe this is correct) and simply convert the .shp into a geojson.

QGIS: reading GeoTIFF file

I downloaded the UN population density raster map (the 2020 prognosis) from here. I want to open this data in QGIS and have it projected correctly, but I can't seem to figure out how.
The following files are in the archive:
Files in archive
I am not sure what the xml files are for, but I know the tfw file is used to georeference the image so that the pixel coordinates can be mapped to WGS84 coordinates.
If I open the gpw-v4-population-density-adjusted-to-2015-unwpp-country-totals_2020.tif, which appears to be the main file, as raster file in QGIS, I get a correctly georefenced outline of the landmass of the world, but without any values representing population density (see here).
If I open the gpw-v4-population-density-adjusted-to-2015-unwpp-country-totals_2020.tif.ovr as raster file in QGIS, I get the population densities, but without proper georeferencing (see here). Strangely, this file seems to contain all relevant information, but is 1/4 the size of the other file, which seems to be useless.
How can I open the files in such a way that I have the population densities with the correct georeferencing? I thought QGIS would know how to do this automatically, but apparently not...
I think the problem is not that the data aren't loading in the first image, but rather, that they aren't being displayed the way you think they are.
Because the histogram of the population values is strongly skewed, QGIS loads 0,0 as the min,max values and everything shows up as black.
Try going into the style tab of the layer properties, and changing the "min" and "max" values to something like 1 and 50.
Alternately, you could classify them manually by changing the render type to "singleband pseudocolor" Like this image here

Generate overlay map image from geo data

I need to generate a transparent image to apply on map similar to these:
Image_1or Image_2
I need to generate this image from a dataset: I have many data points (with lat and long) and I would to generate this image (server side) to show density on map of my data.
Know you something (libraries, or best way to solve my problem) about it?
Those are heatmaps. Google Maps already has this capbility, so you should check out their sample and the documentation. It can be as basic as loading in your data points and applying them as a layer or you can do much more customization.

Best way to display 100k+ points on map

I have a dataset with several hundred thousand lat/long points. I would like to render these points on a map for info-graphic purposes (as small dots or something similar).
This is not something that necessarily has to be interactive, or rendered in a browser. It's okay if it's just an image.
I know that attempting this with markers and Google maps would be tough... any other tools out there that would generate this type of map? Preferably free/open source?
Or, do you have a method to make this work with something like Google maps? I don't want to use a marker clusterer... I need to be able to see all of the points.
In short :)
Download and fire-up Quantum GIS
Add some background map (e.g. OSM WMS layer from http://129.206.228.72/cached/osm)
Have your data in a CSV file, in WKT format, and load it on top (using add delimited text layer)
Save as image
You might want to peek what stackexchange.com has on GIS, too.

Google Maps V3 creating polygon from county name in XML data

Well I have run into a bit of a small problem and I am not sure how to approach this. I have this test map.
http://www.mesquiteweather.net/googlemap_poly.html
Which creates polygons based on data from this XML file.
http://www.mesquiteweather.net/xml/warnings.xml
It displays weather alerts/watches/warnings etc on the map from the data which makes the polygon that shows what area the alert is in and I have an array in another file that assigns the color. All that works great.
Here is my problem. The XML feed doesn't always display alerts with polygon cords that can be split to create latlng object to create the polygons, I will only get county names half the time so there may be alerts in the feed but they will never get displayed if there is no polygon cords. If you look at the feed for cap:polygon you'll see not all of them have it. Right above it though is areaDesc which is the county name. So is there an easy way to create a polygon base on the county name from that data and how?
I have been searching the web with no results. I did read about fusion tables but will that work and can I use that to draw the polygons based on the data from the feed then have fusion tables draw it out? I don't know, I am doing stuff with Google Maps I have never done before so I am out of my element and could use some guidance and assistance. Any suggestions or advice would be greatly welcomed so I can put this project to sleep.
-Thanks
You can use FusionTables to display a FusionTablesLayer with specific counties on it, and style those polygons dynamically (with up to 5 style rules).
FusionTable containing US counties
Selected counties
Example that displays the counties (using a FusionTablesLayer) on the map
Proof of concept, not sure this will be usable with this many counties.
Probably OK with a small number of counties (your original example)