show image tiles from database - javascript

I am trying to build an asp.net web application (not using Silverlight) which zooms and pans into large images like Seadragon. But I do not like to use the deepzoom composer tool to create this files and store the tiles in some folder structure in my server. I would like to store them in a database. There is an Article here http://www.codeproject.com/Articles/33146/Silverlight-Database-Deep-Zoom which describes very nicely how to do this for the Silverlight version of the deepzoom with multiscaleimage control. My Idea is to achieve something similar but without Silverlight.
Maybe My question is similar to this The correct choice of tools for a new Deep Zoom application, I need your suggestions on how to build a control which can show the tiles from database.

Is your question about creating the tiles and storing them in the database? Or is it assuming you already have that, and wondering how best to display them?
If the latter, I recommend OpenSeadragon:
http://openseadragon.github.io/
You just need to write a custom tilesource to produce URLs for the tiles:
http://openseadragon.github.io/examples/tilesource-custom/

I don't know seadragon or deepzoom but in GIS applications with the help of GeoServer (free) you can serve big raster images with tiled-WMS (web map service).
Please google geoserver and wms-t keywords to check if they are suitable for your project or not.

Related

Mapping project - I want to show KML files on a map and be able to sort them based on date, location etc

I am currently undertaking what might be an overly ambitious project for my skill level, but I think I could learn a lot form this exercise.
I work for an aerial surveying company and each time a project is flown, the LiDAR software creates a log file. From this log file, I have written a script that extracts the data and outputs a KML file with data such as flight line numbers, location, height etc.
What I now want to do is write a program that can upload these KML's to a database and show them in a window similar to Google Earth that the user can sort through the flight numbers, locations and dates etc. This would be an incredibly handy piece of software at work and a lot of people would use it, not to mention massive brownie points for my trying to secure a Jnr Dev position in the company going forward.
I know I could mostly use Google Earth to accomplish this task, but for me, it's kind of not the point.
So far, I have looked into Folium and LeafletJS.
https://leafletjs.com
https://pypi.org/project/folium/
Folium can manipulate data and Leaflet can present it, but I am not sure I have the best solution for the job and if it can do exactly what I need to. Especially considering that I only know a little Javascript. I am also not sure if Folium
Ideally, this app would be either a standalone piece of software, or something that my existing script writes to an online server and then can be opened and shown through a browser window. I am biting off more than I can chew with this, but I'm prepared for it to take a little time and be a good learning project. Preferably written in Python.
Any hints or suggestions to what packages I might use would be greatly appreciated. Or, if I am going about this in completely the wrong direction, please let me know.
Thanks a lot.
Welcome to SO.
Here are a few elements that might be useful to you :
leaflet can natively load geojson files. So you could either convert the kml files to geojson using python, or use a leaflet plugin (leaflet-omnivore for example) to read kml files with leaflet. As a first step, I would start with that : a web page that shows one of your flight path. The path data being just a geojson file that is loaded by your app.
then if you want your app to filter flight paths on some criterias, and if you have many of those files, you're going to need a backend. That means a server, with a database, potentially with geo-capabilities (postGIS, mongoDB,... there are many) and a backend application. So your front app (with the js and leaflet) is going to send some requests to your server (send me the file for the flight XYZ please), the backend receives that request, performs a database query, get the file and send it back to the client. The client displays the data on the map.
If you want to write the backend in Python, you can have a look at frameworks like Django or Flask.
That's a lot of tools, but if you start with the js + leaflet part, you will be happy to see a map quickly and will have something to show pretty soon. Then you can start having a look at the backend part. If you manage to get this project done...you definitely deserve that junior dev position.

Create web mapping application. Leaflet or OpenLayers?

I am creating a complex web mapping application (with size files 500 MB GeoJSon and Shapefile), and I use Javascript, GeoServer and Postgis,
I started to create the application with Leaflet, I'm documented a little more about Leaflet, I found that Leaflet is less stable and less powerful with Geoserver and large files.
I have two questions please:
1/ I decided to create an other application and use OpenLayers, what do you think about OpenLayer s? for this kind of application (Complexe application).
2/ I also need the backend part, I do not have an idea of ​​the language that I'm going to use, what I have to use NodeJS or PHP for this kind of application ?
Thank you,
I would strongly advise against Leaflet. The main reason for that is that Leaflet doesn't have the concept of Features. Any feature added to leaflet is added as a separate layer. So a feature is a layer in Leaflet. Features are inherent to GIS applications that is why they exist in other GIS libraries, applications and GeoFormats like: ESRI JS API, OpenLayers, QGis, Udig, GeoJSON, shapefile, etc. So the reason for Leaflet not adhering to these concepts is unclear to me. Perhaps someone else can enlighten us?
For the backend part, it really depends on what you want to do and the requirements you have. A backend can be written in almost any language. You can also use existing solutions like GeoServer, ArcGIS Server and MapServer, these servers support, in various degrees OGC standards like WMS/WFS/WMTS.

QGIS - Creating a map that uses live data

I am very new to qgis and qgis server, which I have downloaded the plugins of Openlayers, and qgis2web with qgis 2.18. As an added note, I have a wordpress site which the map will go into. I have created a map with multiple layers. Hooked up database's data to it to populate what midwest state counties people had went to, who had went to those counties, and how many times they have been to that county. Even colored coded it to show case results. Now I am ready to put the map on the web. Here is my Question: How do you put the map on the web so it will show live data from our database we are using?
I have create a map using qgis2web and exporting it and then use place it within my wordpress's wamp server and was able to display it using an iframe. BUT, I assume it only created that one static instance of the map. If the datbase were to update, it will not show the correct mapping results. In so, I want to keep the map constantly connected to the database so it will show live data. How would I show live data and having the map constantly update? I think I have downloaded the qgis server as well, and hopefully set that up correctly. Was thinking of doing that way as well, but no luck. Any help where to start, or what to do is appreciated.
You might want to consider using Rethinkdb. It pushes JSON to your apps in real time. https://github.com/rethinkdb/rethinkdb
When you export a map using qgis2web it will export your layers as a static files. Using the latest version (2.22.0) it goes into the "data" folder and will create a .js file with the geographic information stored as a geojson (https://en.wikipedia.org/wiki/GeoJSON). Now for a feed with live data this will definitely not work.
To achieve a live feed there are a number of ways to build one. There are certain services like Qgis Cloud (https://qgiscloud.com/) or Carto (http://carto.com/) that allow you to do that. However, these service might not necessarily suit your needs. (In Carto's case only the base functionality is free of charge. The features for building a live feed cost.)
If you want to build it yourself I'm not aware of a "simple solution". There are quite a few different ways to build a web GIS. In short you'd need your geodatabase (like postgres with postgis), a map server software (like geoserver) that renders the geographic information in the database as WMS/WFS services that in return can be visualised using Openlayers, Leaflet or other javascript libraries. The resulting map can be implemented on your site (Some CMS come with plugins that ease the process of implementing mapping services. I don't know about wordpress though).
In any case, it is probably best to just refer to already existing answers and tutorials:
https://gis.stackexchange.com/questions/8113/how-to-start-web-mapping

Contouring function with OpenLayers3/GeoServer

We're stocking rasters in our database, and we want to implement a function inside our web app that will allow the user to add contour lines to the map based on a raster. We want the user to be able to customize the contour levels and colors.
Do anyone have an idea which tools I should be using? I think that I should be using the Python scripting extension of GeoServer, but I don't know if this is possible to implement such a function.
Thanks for your comments !
The easiest way to create contours on the fly from a raster data source in GeoServer is to use the rendering transform gs:Contour. There is a full example in the documentation. This shows how to use an SLD file to specify the contour values, which are then extracted on render and drawn using the remainder of the SLD file. The example assumes a fixed set of contours using a static file, this is easiest.
But the WMS standard allows a client (OpenLayers) to upload a new SLD file with a map request - this is exactly what you want to do here. I suggest that you generate a working SLD file and then use a templating engine of your choice to insert the user's chosen values into the file before sending it to GeoServer for processing. The downside of this is that you will need to send the SLD file with each request and tiling will probably not work well (at all?). You may be able to speed things up a bit by using library mode for the styles, but at the risk of complicating the client.

Offline Mapping Solution

I am in a need of a solution for mobile devices, which will allow to display offline map with some 400 POIS of a given city. I have digged a bit and am stacked with the idea. I will develop my application with rhomobile, so I would have browser, ruby .
Could you maybe give some hint which library and tools should I use? It seems openstreetmap is what I need , but I don't understand or don't know which tool can do following
1) Expprt the whole city into offline file which then could be loaded by some javascript library from local folder and show
I have found out that with mapnik I can generate map tiles and offline in mobile app use them. Openlayers will serve as map showing framework.
Thanks for them who tried to help.

Categories

Resources