0

Please note, this question is similar to this question, which is 4 years old and has no accepted answer. The closest to an answer in that thread - using fusiontables - is not going to work for me because its answer to question #2 below is 'no'.

I have a large (~20 MB) KMZ file, which I need to display in a web browser. Displaying even a small portion of it (~2000 markers) locally quickly overwhelms the browser, so I believe I need to use a server. I am very new to this, however, and have some fundamental questions regarding GIS server functionality.

  1. Can a GIS server such as MapServer render thousands of polygons and placemarks from a KMZ to a tile in real-time? What is this process called?
  2. Can the GIS server respond with additional information stored in the KML file when a user clicks on a placemark?
  3. Can a GIS server execute arbitrary code or scripts, such as a routine to filter placemarks based upon a client-defined polygon?
  • Does this have to be a mapserver solution? Geoserver will create superoverlays in kmz format in near real-time docs.geoserver.org/stable/en/user/googleearth/features/… – Mapperz Mar 16 '15 at 3:28
  • Are you suggesting I create the superoverlays offline and then serve (or read them from a local DB) as requested? Unfortunately, I don't think this will work, as I would like and may actually need to visualize the entire vector data set at once, defeating the purpose of the tiles. Please correct me if I misinterpreted your suggestion. – bfishman Mar 16 '15 at 4:07
  • Large KML/KMZ will just freeze your end users web browser with vast amount of data so you will have to either restrict your amount of data (area size or generalise the data) to improve performance. – Mapperz Mar 16 '15 at 13:52
  • I think it would be best to focus on one question per post. That way there would be no confusion on how to vote when say, someone gives a good answer to question 1 but wrong answers to the rest or vice versa. It would also give those topics the attention they deserve. – R.K. Mar 16 '15 at 14:22
1

You are correct that you need a server to be able to process and send small chunks of the data at the request of your web client. This is the promise of many web-based GIS. This is achieved via 'tiling'. There are a few different approaches

  • Static pre-rendered tiles: There are tools which will allow you to create pre-rendered image tiles from your vector data. You can have a simple webserver serve those and display using variety of javascript mapping libraries.
  • Dynamic image tiles: Servers such as Geoserver render the image tiles on-the-fly when they receive a request. This has the flexibility that your clients request tiles of different configurations without you having to render them offline first.
  • Vector tiles: In this case, the server sends small bits of vector data to the browser client and they are rendered on the end-user's browser.

There are several solutions in each of these categories. If you want something quick without you needing the full control of the server, try Fusion Tables, CartoDb or MangoMap. If you want some advanced capabilities, Geoserver or Mapbox Studio will be a better choice.

Pro Tip: Many of these systems will support only KML files not KMZ. You can simply unzip the KMZ file and use the resulting doc.kml as a substitute.

  • I believe your second bullet, dynamic tiles, are what I'm going for. I'd like to send a small request to the server (and I need this to be flexible, i.e. be able to write a custom request message and the handlers for that), and have it return a new set of tiles based upon the results of the request. I'll be using a public tile service for the satellite/road images, so I'll need the server to return 'overlays' - i.e. images with the vector data rasterized, and transparent everywhere else. Can GeoServer alone do this, or will I need more (server) software in my GIS stack? (client is leaflet) – bfishman Mar 16 '15 at 4:04
  • Cool. You can use Leaflet to display GeoServer WMS. Geoserver is deployed as a Apache Tomcat web application, so that will be your server. – spatialthoughts Mar 16 '15 at 4:38
  • Just got tomcat7 up an running on my server (webfactional hosting). Will report back and update / accept answers as this progresses. – bfishman Mar 16 '15 at 6:39
  • from your comments sounds like you need a tile server this is a little wacky but gives you leaflet tiles mattmakesmaps.github.io/TileStache-GiphyAPI-Demo added leaflet tag to you question – Mapperz Mar 16 '15 at 13:55
  • My solution was as follows: PostgreSQL/PostGIS + GeoServer for the server, Leaflet for the client. – bfishman Apr 8 '15 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.