We are currently working on an ABM using GIS in Netlogo. We are trying to use multiple computers to run simulations. On two of the computers, the model runs perfectly, but on the third, the GIS data will load in and then will not display. After multiple tests, we have seen that the world envelope for one of our data sets is different than the other three. Does anyone know how to rectify this problem? We have tried transforming the data and checking to be sure we have the same data files on all three computers, but it does not seem to help our problem.
Related
I have a fairly simple, and what I would think to be common mapping web mapping project to complete. I'm struggling in my selection of a web mapping API. Thus far, I've not been able to one that meets the following requirements.
Able to display thousands of points in one view without choking crippling the browser. To be specific, I'd say I would like to display roughly 30,000 points at one time and still be able to navigate around a slippy map without degraded performance.
Local maps. The web server will run on the local client, so being able to display a map without reaching out to the internet (even if it's a very basic map) is an absolute requirement.
Render dynamic data from a database onto a map (most API's are meeting this requirement).
Draw polygons directly on the map, and export the lat/lon values of all vertices.
In your experience working with map api's, do any of them meet the requirements above?
I've looked at OpenLayers 3, Leaflet, and Polymaps. Aside from reading every piece of documentation ahead of time, I can't discern if any of these would fill all requirements. Again, I'm hoping someone with experience with any API could point me in the right direction.
Thanks!
As for Leaflet:
Thousands of points: you could use one of these plugins:
Leaflet.markercluster, clusters your points into "groups of points" at low zoom levels.
Leaflet MaskCanvas, replaces all your points by a single canvas layer.
Local maps: as long as you provide a way to create image tiles (even on the local machine), most mapping libraries should work.
Dynamic data: depending on what you call "dynamic", all mapping libraries should provide you with built-in methods to display your data.
Drawing polygons and export lat/lon vertices: use Leaflet.draw plugin
OpenLayers 3 would very probably provide you with all these functionalities as well.
I am trying to retrieve data from a website for which the parameters that you need to define does not show up in the url ie. http://www.vmm.be/webrap/ibmcognos/cgi-bin/cognosisapi.dll?b_action=cognosViewer&ui.action=run&ui.object=%2fcontent%2ffolder[%40name%3d%27Water%27]%2ffolder[%40name%3d%27Afvalwater%27]%2freport[%40name%3d%27Individuele%20analyseresultaten%20per%20RWZI%27]&ui.name=Individuele%20analyseresultaten%20per%20RWZI&run.outputFormat=HTML&run.prompt=false&ui.backURL=%2fwebrap%2fibmcognos%2fcgi-bin%2fcognosisapi.dll%3fb_action%3dxts.run%26m%3dportal%2fcc.xts%26m_folder%3di5DDA04E5A00C4B6AB6DF44BB4FAD7CEC&p_RwziNr=51&run.prompt=false
how can I extract the data for different years and parameters in a programmatic way?
I am using matlab's urlread but since the data I want to import does not show up in the html-code (I have checked this with the Web Developer Toolbar in FireFox), nothing is being read in. I have no experience with websites, only matlab and c-programming, so I have no idea how the data can be shown in the browser if it is not showing up in the html-source code so could someone point me to the right direction on how to get this job done? Is it at all possible? I hope so because I will have to repeat this for around 500 measuring stations, each 10 years so I am not planning on copying the required data manually as I did before when I just needed one station.
it turns out it is not possible to do what I want in Matlab. I however did manage to get the required data programmatically by using a combination of Selenium with C# and chrome driver. It's slow, but it's working and I can do other stuff in the meanwhile so I can recommend it to everyone who is downloading data from servers in a tedious way.
First, I'd like to let it be known that this is my first journey into developing mapping applications with such a large set of data. So, I am in way locked into the techniques or technologies listed below...
The Overview
What I am trying to accomplish is the ability to load my company's market information for the United States onto some form of web-based mapping software. Currently I am trying to accomplish this with Google Maps JS api and GeoJSON data, but am not against other alternatives. There are roughly 163 files (ranging from 6MB to 200KB) that I have exported from ArcGIS into GeoJSON files, and then loaded into a database (currently as GeoJSON strings). We have developed a UI that loads the data based on the current map bounds and Max/Min calculations in the corresponding records.
The problem I'm running into is the render time on the map itself, which is annoying when switching between different regions, states, or zoom levels. The API calls to load the data are acceptable in regards to the size of the data being retrieved. My boss said it is great for a proof of concept, but would like to see it much, much faster.
The Questions
What suggestions could you offer to increase the render time?
Are there better options (3rd party libs, techniques, etc) for what I'm trying to accomplish?
It was suggested by a co-worker to export the map shapes and just use the images for overlaying the information based on the coords. Any input on this?
One solution to your problem could be reducing number of vertices in polygon or polyline layers (files) while preserving feature's shape. In that way geoJSON file would be smaller and easier to render.
You can use tools available in ArcGIS for Desktop.
See
How to Simplify Line or Polygon
or
Simplify Polygon
I'm sure there are similar tools in QGIS or any other open source GIS software.
There are other solutions to your problem like prerendering data in map tiles that could be overlayed over Google Maps basemap(s). That is probably the fastest solution but more complicated.
Maybe this could be good starting point.
Just couple of random thoughts.
On one project I worked on I noticed terrible performance with geoJson I loaded via REST service.
I found out that browser's JavaScript engine had hard time parsing large geoJson responses. I finally decided to load data in batches (multiple requests). Performance increased enormously.
I noticed you use 163 files (layers?). Do you display them at the same time (no no no) or you have some control panel to switch layers on/off? If you display them at the same time then performance will suffer for sure and you should look into generating map tiles with thematically grouped layers. In that way you'd come up with couple of tile layers that you can switch on and off.
Also, if data used to generate tiles changes frequently than tiles aren't good idea. Then maybe you should look into Web Map Services. WMS generates maps on the fly from data stored in database. GeoServer supports WMS and it's easy to configure and use.
I'm working on an google map application that uses a geojson file that stores the ZCTA (Zip Code Tabulation Areas) of states. These files are fairly large and take some time to load so I was trying to find ways to reduce the loading time of the geoJson file.
I have looked at this question here:
Is there a memory efficient and fast way to load big json files in python?
so I am aware that reducing the loading time isn't easy to do.
but I came across this link that quickly loads ZCTA:
http://www.trulia.com/home_prices/
So my question is this: What has the developer done on this site to quickly load the ZCTA data? Can anyone see offhand how it was done?
You are basically asking, "how do I write the user interface for a GIS that will offer high performance?"
The developer of this website is not storing this information in a JSON and then loading it each time in response to each user's clicks. The developer is probably storing all of these objects in memory. To make things even faster, the developer has probably created the various KML files for the Google map in advance. The developer may be interfacing directly with Google, or may be using a commercial GIS that has an output format that employs Google Maps.
For example, you might check out https://gis.stackexchange.com/questions/190709/arcgis-to-google-maps.
Currently I have an openlayers web page which querys a tilelite server serving up mapnik tiles with various shapefiles (rivers, lakes, fire boundaries, time zones, nat forests, BLM land, tv reception contours ...) added through layers-shapefiles.xml.inc.
Soon I will be traveling extensively around the western US. I'm looking for a system that can generate tiles locally so I don't use up my data usage (my current setup works well for this), but has a little more capability when it comes to querying shapefile data. My current setup is pretty limited when it comes to this. I can turn on and off shapes and names depending on the zoom level but I'm looking for something that might let me query individual shapes and present the cooresponding data (from the shapefile db) in say a popup window or slide out frame. I'm OK with constructing the popup or slideout frame if needed.
I'm thinking of installing mapserver and seeing what it can do, and I will probably do that today, but I just thought I would ask if anyone might help steer me toward a tool with the capabilities I'm looking for.
Update:
I've taken a day to familiarize myself with mapserver. I can turn on and off layers, which I couldn't do with mapnik tiles served up by tilelite and screened by openlayers. However, I couldn't find any examples of people doing what I previously described which was querying an individual shape and getting the attributes for that shape from the shapefile attribute table and presenting it somehow on the web page via balloon, popout... Is what I'm asking possible yet?
Thats possibl. Check here
http://openlayers.org/dev/examples/getfeatureinfo-control.html
http://demo.mapserver.org/tutorial/section3.html