wet-boew / wet-boew-drupal

Drupal variant of the Web Experience Toolkit (WET)
137 stars 74 forks source link

Anyone using any GIS mapping in Drupal? #246

Closed StephenOTT closed 12 years ago

StephenOTT commented 12 years ago

Looking over the GIS options for drupal, and it seems like the OpenLayers module is the most advanced. Anyone using anything else? Have anything custom developed?

joejoseph00 commented 12 years ago

City of Ottawa construction projects maps is what you're working on right now I presume? http://ottawa.ca/en/city_hall/planningprojectsreports/construction/map/index.html

You'll want to be able to directly consume KML. Seeing as I wrote the spec for ArcGIS exporting , don't kill yourselves on fancy custom xml like some people wanted me to do on my last City of Ottawa contract. It appears KML is still the standard, and I'd use it again still in 2012, as it's got the most support and will give you the least head-aches.

Test out the performance of the API's of the various providers.

It seems like OpenLayers module for drupal supports the most map systems (OpenStreetMap, Virtual Earth, Google Maps, Bing, Yahoo, etc) .

First bit of advice, test the map API for KML load speeds and KML rendering speeds. I know that Google is blistering fast (provided you follow my ArcGIS export spec, and I recall that I wrote a script to clean out points on straight lines (no need to have more than two points to describe a straight line right? but it's been so long, it should be in your documentation at the city where I left it. I wrote a doc on generating clean KML for fast rendering. It appears you're probably still using it because the site renders nicely.

Compare loading speeds of your KML on the various platforms, test against the major browsers, this will give you a good idea what is usable and what isn't so you can quickly eliminate the ones that are too slow. As far as customizing your view, back in 2009 I did things that would work in stellant, there's probably more elegant ways to do things now but the same idea will apply, you'll want the map framework to dynamically add checkboxes for each new layer of KML you add. Back in 2009 we had an xml file that specified all the KML files, you might want to do a GUI in Drupal for that with the forms API, or you could just do it the old way. The javascript loaded the xml file, inside the xml were paths to KML files with a title description, one for english, one for french, and based on the number of kml files would load each one and as they loaded dynamically add the checkboxes by going into the DOM. Today with drupal you could do it the old way, or you could probably find a drupal way to do this.

If you can get communications off your back, you should be able to pump something out quick, last time I remember sitting in many meetings listenning to highly skilled people talk about colours and icons. People seemed to get very excited about these maps, then the FUD people come in and scare everyone about terms of use and the evil google plan to put advertising on your map and other FUD people (mostly internal city staff) come scare everyone into thinking that google is going to sue you for back pay on usage fees or that they'll change their terms of service in two days.

The fact that you're still using Google tells me that none of the FUD came true, and that Google maps is still the best platform and that there's no reason to change . However it does look like BING has come a long way, and others might have as well. Google was light years ahead of everyone, and probably still are way ahead. Do some benchmark tests, check for yourselves.

StephenOTT commented 12 years ago

Great info @joejoseph00

I am looking at the total site. There is a massive need for GIS capabilities across the board. Would like to look at having a significant GIS base as a master data record for many queries that as GIS based around the entire site

StephenOTT commented 12 years ago

Anyone know of any Depts, Agencies, or corps that are heavy users of GIS on their website?

StephenOTT commented 12 years ago

Found GIS Map usage across feds:

  1. http://geoviewer.inac.gc.ca/geoviewer/Default.aspx?LANGUAGE=en
  2. http://www.acdi-cida.gc.ca/acdi-cida/ACDI-CIDA.nsf/eng/CAR-912103936-K7T (base links: http://www.acdi-cida.gc.ca/acdi-cida/ACDI-CIDA.nsf/eng/CAR-12516047-SN2)
  3. http://magazine.canadiangeographic.ca/worldmap/cida/CIDAWorldMap.aspx?Language=EN&Resolution=800x600
  4. http://www.pco-bcp.gc.ca/aia/index.asp?lang=eng&page=world-monde
  5. http://www.veterans.gc.ca/eng/contact#map (base links: http://www.veterans.gc.ca/eng/interactive-maps)
  6. http://apps1.gdr.nrcan.gc.ca/geochem/main_e.phtml
  7. http://gdr.ess.nrcan.gc.ca/e/viewer.htm
  8. http://gdr.ess.nrcan.gc.ca/geochron/e/explorer.htm
  9. http://edg.sst.rncan.gc.ca/ed_pad/e/viewer.htm
  10. http://gdr.ess.nrcan.gc.ca/ed_pad/e/viewer.htm
  11. http://apps1.gdr.nrcan.gc.ca/gsc_minerals/index.phtml?language=en-CA
  12. http://www.dfo-mpo.gc.ca/sch-ppb/maps/map-eng.asp?c=fc (Base links: http://www.dfo-mpo.gc.ca/sch-ppb/maps/maps-home-accueil-eng.htm)
  13. Good example of ArcGIS usage http://maps-cartes.ec.gc.ca/indicators-indicateurs/default.aspx?mapId=17&xMin=-17200268.28492363&yMin=4842529.641591634&xMax=-5498653.153107968&yMax=12669696.953842915&lang=en (Base Links: http://www.ec.gc.ca/indicateurs-indicators/default.asp?lang=En&n=130FFF78-1)

More to come

joejoseph00 commented 12 years ago

Lots of things you can do with GIS. Should be able to create a content type for GIS data, taxonomy as well to help filtering and can be useful down the road. Can leverage existing frameworks to consume content. Could index the data in solr. Or could maybe use Solr to pull the data directly from the ArcGIS database and bring it up in the Drupal interface. The possibilities are endless. I'd try out some of the existing contributed modules, see if there's any ideas worth borrowing, it's definately a space that has a lot of potential. There are some open source map systems as well , but it all depends on your budget and your design parameters. If the city is willing to keep using Google maps that's going to save you a lot of time on the map framework, but if not, then you not only have to get the drupal side to do what you want but you'd also have to probably spend some extra time on the map framework side to make it do what Google or another provider already does for you.

OpenStreetMaps has come a long way since I last looked. It is capable of consuming KML. I would test it for performance , expecially rendering sizable datasets and compare it to google map rendering and API as the gold standard.

here's a good pdf doc explaining: http://assets.en.oreilly.com/1/event/56/Openstreetmap%20-_%20_PostGIS|MySQL|SpatiaLite_%20-_%20OpenLayers_%20From%20Map%20to%20Web%20Presentation.pdf

also see this link:

http://gis.stackexchange.com/questions/30841/web-site-with-google-map-like-or-gis-one-million-record-database-and-a-feature

and see this website, it's running on Drupal by the way: http://www.osgeo.org/

StephenOTT commented 12 years ago

One of of the areas i think that will be the most valuable is a bit of Master data management from the GIS side. being able to provide views based on the GIS query rather than the drupal table query. There is a lot of potential relationships (geographic based) that could be leveraged is a GIS base is properly leveraged.

At this point the actual visual map is not so much my concern. It is about the data feeds (push, pull, and pull with query) and the presentation options. Need to get that frame set up. So mainly looking at OpenLayers right now to see if it will provide the needed capabilities. If we can get some of these basic (but complex) configuration issues resolved it provides a really great base for other wet users for GIS based data - both for visualization, but also query +data

joejoseph00 commented 12 years ago

ok, gotcha, ya, so use Solr to pull the data directly from the ArcGIS database and display it directly in drupal

Drupal would just be an interface to your datasource allowing you to search GIS data used to search and display GIS data.

basic but complex ;) lol

StephenOTT commented 12 years ago

So the example i like to use is Neighbourhood boundaries. As other physical assets, address, events, location names, parks, roads, etc etc get referenced a aggregation from a Geo level around neighbourhoods becomes important... under the assumption that you do not want your contributors to tag everything with multiple taxonomies to ensure the proper address point is in the proper geographic boundaries that lay on top of the address point. There are lots of REST services available that help make this easier. But need to set up the integration and provide a nice UI.

StephenOTT commented 12 years ago

Going to test the following to see what we can do: http://drupal.org/project/openlayers_solr http://drupal.org/project/geofield ---See Github Fork from Treehouse agency: https://github.com/treehouseagency/geocode --Run diff on Github and Drupal.org latest stable versions. Commits may of already been made

StephenOTT commented 12 years ago

Looks like Energy.gov is the site to start looking into. They have used many of the modules needed and have a lot of the features we are looking for.

StephenOTT commented 12 years ago

Video from Treehouse showing GIS setup with Drupal, Solr, and OpenLayers. http://treehouseagency.com/blog/neil-hastings/2011/09/22/maps-geocoding-search-talk-dug-indy

Look to Treehouse Github Fork for Geocode module from Drupal.org. Maintainers were not keeping up at the time. https://github.com/treehouseagency/geocode

OpenLayers Accessible Keyboard example: http://openlayers.org/dev/examples/accessible.html

OpenLayers Solr Integration: http://drupal.org/project/openlayers_solr

Ircan Geomap: http://ircan-rican.gc.ca/projects/gcwwwmap-carte-geo/wiki/Geomap_-_Feature_guide

mgifford commented 12 years ago

Fortunately better keyboard controls were brought into 2.12 here - https://github.com/openlayers/openlayers/pull/222

But they are pretty limited. If you want to pan left/right or zoom in/out it works ok. However you can't switch labels and many of the other map elements don't work.

There also aren't alt text provided in most of the images. I've opened up a few bugs in https://github.com/openlayers/openlayers/issues but won't expect them to be addressed in 2.12.

It's still quite possible to fix the bugs, bundle our own customized OpenLayers.js file and use that.

StephenOTT commented 12 years ago

Move further discussion to #361