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
Related
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.
After I imported shapefiles into geoserver following a tutorial and tried to preview, I find the output image is not right while there is no errors in logs when i choose openlayers or png, jpeg, gif. The image is like a map stained by ink.
However, when I output the layer as PDF, the image is normal ....
All the configurations are default except SRS.
The url is
http://localhost:7070/geoserver/mygis/wms?service=WMS&version=1.1.0&request=GetMap&layers=mygis:roads&styles=&bbox=1.2878111774224255E7,4781149.089993679,1.3037623853023177E7,4928041.91732644&width=768&height=707&srs=EPSG:4326&format=application/openlayers
And the tiled layer of my imported shapefiles is blank.
Is there any way to solve this ?
Thanks in advance !!
With out seeing the map and some more information about the shapefile it is hard to give a definitive answer but looking at the URL you provide the problem seems to be that you have specified the SRS (projection) as EPSG:4326 which is lat/lon degrees while your bounding box appears to be measured in meters which means that all your data will be clustered in the very centre of the map if it really is in degrees or distorted due to the mismatch in projections if it is projected.
As a first guess I would change the SRS parameter to epsg:3875 (web mercator) and see if it looks better.
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.
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.
Re,
I have this strange problem... one track refuses to show in Google Earth. It displays the distance, elevation, everything, but there are no visible track lines. Importing it into Google Maps works fine.
Basically, I have a file with over 350k points. When assembling it, I separated tracks by dates and am now trying to merge them together (manually, by editing the KML file). It appears that when I try to merge placemarks with thousands of coordinates, they stop displaying in Google Earth; as if there is a limit as to how many coordinates a placemark (linestring) can contain.
Here's the file: http://www.upl.co/upload/s4Co0Gc2Q
Thanks in advance.
You need to use the <tessellate> element on the linestring. This specifies whether to allow the LineString to follow the terrain. To enable tessellation, the altitude mode must be clampToGround or clampToSeaFloor. Very large LineStrings should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).
The other option is to use the <gx:altitudeOffset> element. This is A KML extension, in the Google extension namespace, that modifies how the altitude values are rendered. This offset allows you to move an entire LineString up or down as a unit without modifying all the individual coordinate values that make up the LineString . (Although the LineString is displayed using the altitude offset value, the original altitude values are preserved in the KML file.) Units are in meters.
Something like this should work.
<LineString id="ID">
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>clampToGround</altitudeMode>
<coordinates><!-- lon,lat[,alt] --></coordinates>
</LineString>
I have a LineString with about 96000 coordinates, and see the same effect that I can load the KML in google-earth, and see everything correct, except for the LineString (lines are not displayed), as if I had execeeded a certain limit.
The coordinates do not have an altitude. I tried with and without tesselation and alitudeMode clampToGround.
Solution for me was to split the LineString up with a MultiGeometry, splitting it in half was sufficient (each LineString now has less than 64000k coordinates).