geoserver preview error when output format is openlayers and png - gis

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.

Related

Openlayers GIS - Georeferenced DEM(GeoTIFF) not positioned correctly in Map (OpenStreetMap)

With Openlayers, I'm visualizing GIS rasters(DEM, Orthomosaic) in GeoTIFF format(using WebGLTileLayer) on top of OSM(as WebGLTile layer) in OL Map.
The issue I'm having is, the GIS rasters which have georeferencing, are not positioned in its correct geographic position on the OSM base map. The DEM seems to appear in nowhere, around gulf areas or on top of water bodies.
I've created OSM layer with it's default projection & I'm setting view after raster source is loaded, using source.getView()
I referred to Raster reprojection examples in the Openlayers website, but wasnt able to solve this.
Does anyone have an idea on how to resolve this?
As Mike had suggested in the comments, this issue was happening since even though the projection name was identified from the raster - Eg: "EPSG:3237", the Openlayers library doesnt have the projection definition(what it actually means), so now I'm fetching proj definition from epsg.io & registering in proj4 defs. Now it works perfectly!
Thanks Mike.

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

mnist's deep feature visualizations is nothing

when I used yosinski/deep-visualization-toolbox to visualize the conv feature of mnist, I found that the deconv feature is nothing, the left-bottom of the picture
but the visualization of imagenet is what I want to see
so I am wondering what the problem is? the toolbox's visualization problem or the special thing of mnist's feature?
I use darkon to visualize, it looks good
top is heatmap, bottom is feature map
when feed a noise image, the net get a wrong label '5', we can see that the heatmap and feature map get a wrong location:

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.