Generate Tiles with GDAL - openlayers-3

I want to generate different raster according to scale like Google Maps with gdal tool GDAL2TILES for my WEB GIS who run with OL3. For example,
scale 1 :
and the same place Scale 2 :

What you are looking for is a tile server to seeding the tiles for your openlayers application to consume. And the different image output at different zoom level in the same location is called raster pyramid.
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Raster_pyramids
Back to your question, if you want to generate tiles, there are multiple solutions out there, many free open sourced ones are build based on GDAL as you mentioned such as GeoWebCache, MapProxy, etc.
You can seed/replace tile image at different zoom level to generate your own raster pyramids. And then you can either consume the Tile map service, or directly access the tiles via OpenLayers.

Related

How to overlay the RTDOSE and Image data in the correct position?

I'm currently an MS student in Medical Physics and I have a great need to be able to overlay an isodose distribution from an RTDOSE file onto a CT image from a .dcm file set.
I've managed to extract the image and the dose pixel arrays myself using pydicom and dicom_numpy, but the two arrays are not the same size! So, if I overlay the two together, the dose will not be in the correct position based on what the Elekta Gamma Plan software exported it as.
I've played around with dicompyler and 3DSlicer and they obviously are able to do this even though the arrays are not the same size. However, I think I cannot export the numerical data when using these softwares.I can only scroll through and view it as an image. How can I overlay the RTDOSE to an CT image?
Thank you
for what you want it sounds like you should use Simple ITK (or equivalent - my experience is with sitk) to do the dicom handling, not pydicom.
Dicom has built in a complete system for 3D point and location specifications for all the pixel data in patient coordinates. This uses a bunch of attributes in the dicom files in the Image Plane Module set of tags. See here for a good overview.
The simple ITK library fully understands and uses the full 3D Image Plane tags to identify and locate any images in patient coordinates by default - irrespective of such things as the specific pixel spacing, slice thickness etc etc.
So - in your case - if you use SITK to open your studies, then you should be able to overlay them correctly "out of the box", because SITK will do all the work to parse the Image Plane Module tags and locate the data in patient coordinates - just like you get with 3DSlicer.
Pydicom, in contrast, doesn't itself try to use any of that information at all. It only gives you the raw pixel arrays (for images).
Note I use both pydicom and SITK. This isn't something bad about pydicom, but more a question of right tool for the job. In fact, for many (most?) things I use pydicom, but for any true 3D type work, SITK is the easier toolkit to use.

Suggestions to place points on a floor plan

I need some directions (tutorials, examples, etc) to help me to figure out how I could, from a floor plan (ex: png file for now), place some points/icons to different locations and be able to zoom in/out, drag and rotate.
In fact, a bit like google map, with only basic stuffs.
Thanks
Take a look at the Grid List Demo in Flutter Gallery:
https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/material/grid_list_demo.dart
It features an Image viewer with zoom and pan support.
(You can also find the Gallery on the Play Store)
Instead of using a simple image, use a Stack that overlays Positioned widgets over your image.

Software to open titled geo PNG file?

I'm trying to extract some a data (a map image) from a PNG file which is tiled somehow. The file itself is only 256x256 pixels (according to 'get info' on the mac) but is is 23MB. It is from an iPad app called Mud Map and it contains a map that I purchased but I've lost the original that I converted to this format. When I view this file (renamed to a .PNG) I see one section of the map - 256x256px.
I'm asking this question on StackOverflow because I want to know more about these tiled images. How does one create a tiled PNG and what is the software that will open and or create these things. I'm interested in what metadata is required too. I'm loving the outdoors and mapping!!
The answer to this question, is that it cannot be done in manner I have described.
The images in the PNG are not tiled, the the files are just merged together which is no doubt an individual feature of the program as is it does not appear to be any kind of standard.
I have no access to application you mentioned in IPad. Just share some thought about possible situation here.
1) Map tiles are commonly used in GIS web application such as Google maps and so on. It is used to improve the performance especially when user pan very often. A map displayed typical map window is divided into for instance 4*4 separate calls. So maybe only 4 call will be made when user just pan a little bit instead of get the whole map for the 16 tiles.
The source image for this tiles can be in pre-generated tiles or just one static map.
2) Assemble separate images to one in GIS is called image mosaic function. GIS server can read a collection of images and mosaiced them into one with the overlapping part handle based on a certain rule. And the images are in pre defined grid format which are seamless and no overlapping, then it is called tiled images. We could pre-generated the tiles from one mosaiced image, or we can server it on the fly. Some GIS server/library/application does have the tile server function built in.

Best way to create custom building's map for iOS

I see some ways to do it:
1) Draw using OpenGL programmatically.
2) Draw using QuartzCore and CoreAnimation programmatically.
3) Draw map in AutoCad and then somehow connect it to iOS.
4) Draw map using SVG.
Requirments are supporting pathfinding and gps navigation.
For first 2 ways I think that it's expensive in terms of performance way, redraw all elements on scaling; and I don't think that this way may have GPS-navigation support.
Using AutoCad pictured maps is hard to understand for me how to connect it with graphs\paths for pathfinding.
My colleagues will develop this app on web using SVG. I found it - https://github.com/SVGKit/SVGKit , but still have no idea how it will support pathfinding and navigation.
I would appreciate any help.
Generally there are two types of map application:
A) They display a map, (with or without a user position) without needing to calculate a path like a navigation system does (see point B)
B) Application that use the vectors of a map and calculate something: e.g to find a best path. The shortest connection, e.g A navighation system , etc.
Application for A) are usually less complex then that of B), because the vectors can be somewhat inacurate, have no conections, have small gaps, have no logic between the edges, etc.
1) To only display a building map, you would only need a list of edges. (An edge is pair of coordinates (x1,y1) - (x2,y2). How ever you get that. E.g MapInfo Professional format mif/mid.
Or even you could dispaly a pdf that contains the map of the builing. Right with the built in PDF View, (also with SVG but more difficult).
Things get much more complicated if it is not a relative map, but also a map that is positioned with an reference coordinate system, like latitude/longitude (WGS84).
In that case you would use a Tool (mapInfoProfessional, to import AutoCad DXF Files, and apply 3 GPS measured reference points at the corner of the house, and convert that to LatLong WGS84 coordinates system.
With ios you cannot measure that 3 Points because you cannot average a position, ios stops sending when you are standing still at one corner of the house.
You could try to extract the positions from a google earth satellite foto if you are living in a region where google Sattelite fotos have high resolution. (But this might violate the license conditions of that Satellite Foto provider (Topic: derived data))
Finally you now have a list of edges in Lat Lon coordinate System.
For Displaying I personally would either do with 1) OpenGL) or 2) Quartz2D.
Now the Path finding part.
Probaly you need a second "map" that defines the possible paths inside the building.
This structure must be a connect graph (points with connected neighbours).
Computer games do it that way. (Some even allow you to display that path in developper mode)
The path can be drawn, in a different layer of the floor plan. But this path
has higher requirements: No gaps are allowed, all must be perfect connected.
Call that layer "Path" and export it as own plan.
Now use only this path layer, and import, and create a graph of nodes with connect neighbours.
Use Dijkstra Algo to search for shortest path.

Building density maps with large geocoded datasets?

I have a data set with over 50,000 geocoded points (lat-long). Each point has a set of data associated with it -- things like quality, status, etc.
I'd like to make a set of density maps showing the distribution of data by those metrics. For example, one map would show the density of all items with a quality of "good".
With a smaller set of points, I'd use Google Maps and custom markers. Here, however, different segments have tens of thousands of points
Are there any APIs or libraries that could help me do this?
The solution I will be going with:
Break the area to be mapped into a
grid.
Count the number of entries
falling inside each square.
For each
square, generate a PNG with
transparency relative to the number
of entries.
Populate a Google Map with
this set of PNGs as markers.
Google Fusion Table does a nice job at it http://www.google.com/fusiontables/Home/
Good for you that your data are already geocoded, because -from my recent experience-, Google location resolver does not let you dealing with ambiguous location..
One solution could be to create bitmaps with your density maps and add them (only one at the same time) as overlay on your google map (with GGroundOverlay)
You may have a look at this post that gives an example of density map with google map. It uses the HeatMapAPI. Unfortunately, this API is not free if you use it with a large number of points...
Put build your own density bitmap may be not so complicated...
One other solution is to reduce the number of markers you can use. It could be done with the MarkerClustered library. It is not exactly a density map, but... can maybe be useful.
http://heatmap.codeplex.com/

Resources