Maps from memory
I came across this nice post aboutmaps from memory - its a fun exercise and is quite revealing about how we perceive place & space.
I came across this nice post aboutmaps from memory - its a fun exercise and is quite revealing about how we perceive place & space.
In this tutorial I demonstrate the QGIS delimited text plugin, including how to load geometries from Well Known Text (WKT) descriptions rather than simple x,y values. This means that you can load non-point geometries from a text file now too. For more information on the WKT, wikipedia has a nice article.
In this tutorial I demonstrate the QGIS delimited text plugin, including how to load geometries from Well Known Text (WKT) descriptions rather than simple x,y values. This means that you can load non-point geometries from a text file now too. For more information on the WKT, wikipedia has a nice article.
I recently posted a list of software I use to build GeoSpatially enabled web applications. One more tool I should mention is Selenium. Selenium is a web testing suite which includes an extension to Firefox that lets you ‘write’ test units by interactively using your web site. When you run a unit test, the actions you carried out on the site are replayed and the test passes or fails based on whether the recording replay could be completed. Interestingly, the recorded script can be edited and saved out in different languages (perl, php, python etc). I didn’t have much luck getting this latter feature to work and I also had some problems getting test units to run repeatably for some of my ajax driven pages – though I am still new to the software so perhaps I will figure out my issues given further reading of the docs. Linux User Magazine has a nice article about Selenium which is well worth a read.
I recently posted a list of software I use to build GeoSpatially enabled web applications. One more tool I should mention is Selenium. Selenium is a web testing suite which includes an extension to Firefox that lets you 'write' test units by interactively using your web site. When you run a unit test, the actions you carried out on the site are replayed and the test passes or fails based on whether the recording replay could be completed.
Interestingly, the recorded script can be edited and saved out in different languages (perl, php, python etc). I didn't have much luck getting this latter feature to work and I also had some problems getting test units to run repeatably for some of my ajax driven pages - though I am still new to the software so perhaps I will figure out my issues given further reading of the docs. Linux User Magazine has a nice article about Selenium which is well worth a read.
I came across this beautiful guide to the new web called ‘20 Things I Learned‘. It’s published by the Google Chrome team and it’s a really great resource if you are trying to introduce someone to all the jargon that surrounds our online life in a friendly way.
I came across this beautiful guide to the new web called 20 Things I Learned. It's published by the Google Chrome team and it's a really great resource if you are trying to introduce someone to all the jargon that surrounds our online life in a friendly way.
During the recent QGIS hackfest in Poland, we spent some time discussing the use of GIT and I spent a bit of time to learn the basics of using GIT. One thing about GIT that is different for users like myself coming from an SVN background is the way that creating and applying patches is done. Typically under svn I would do something like this to create a patch:
svn diff > foo.diff
And then to apply that same patch I would do:
patch -p0 < foo.diff
Which is all quite simple. Git’s process is a little different. Here is my workflow for creating a patch:
So here is a simple session that does the above:
git branch patch-testing git checkout patch-testing ( do some work in that branch now) git commit -m "Important changes" -a git format-patch master
After you are done with that, Git will have created a nice little diff for you. To apply the patch to another checkout do:
git apply foo.path
Then commit and push your changes to the origin repository.
During the recent QGIS hackfest in Poland, we spent some time discussing the use of GIT and I spent a bit of time to learn the basics of using GIT. One thing about GIT that is different for users like myself coming from an SVN background is the way that creating and applying patches is done. Typically under svn I would do something like this to create a patch:
svn diff > foo.diff
And then to apply that same patch I would do:
patch -p0 < foo.diff
Which is all quite simple. Git's process is a little different. Here is my workflow for creating a patch:
So here is a simple session that does the above:
git branch patch-testing git checkout patch-testing ( do some work in that branch now) git commit -m "Important changes" -a git format-patch master
After you are done with that, Git will have created a nice little diff for you. To apply the patch to another checkout do:
git apply foo.path
Then commit and push your changes to the origin repository.
In the last few weeks I needed to implement some charting / graphing for a project. Here are two great options:
1) The Google Chart API is a web service that you can call from your web page and it will embed a chart into your page based on the data you send it. They have many nice options for creating good looking charts, and even include some options for creating simple thematic maps.
Advantage: Offload the work to Google and benefit from the maintenance and cool new features they provide.
Disadvantage: I found it sometimes a bit slow to return the chart and Google naysayers may prefer not to hand over control of important parts of their app to Google. Also I think the API is a little less intuitive than the Flot api.
2) The Flot Jquery plotting library. While it may lack all of the bells and whistles of the Google Chart API, Flot has some bells and whistles of its own. If you have used OpenLayers before, you will find Flot familiar in that it just attaches itself to a div and renders into that. With some add-ons you are able to make interactive charts e.g. where you can zoom in and out of the chart, click on elements to find out more about them and so on.
Advantage: A ‘natural fit’ if you are already using jquery. Also you control everything so no need to worry about dependency on Google services.
Disadvantage: Doesn’t have quite the range of charting options that the google API has.
In the last few weeks I needed to implement some charting / graphing for a project. Here are two great options:
1) The `Google Chart API`_is a web service that you can call from your web page and it will embed a chart into your page based on the data you send it. They have many nice options for creating good looking charts, and even include some options for creating simple thematic maps.
Advantage: Offload the work to Google and benefit from the maintenance and cool new features they provide.
Disadvantage: I found it sometimes a bit slow to return the chart and Google naysayers may prefer not to hand over control of important parts of their app to Google. Also I think the API is a little less intuitive than the Flot api.
2) The `Flot`_ Jquery plotting library. While it may lack all of the bells and whistles of the Google Chart API, Flot has some bells and whistles of its own. If you have used OpenLayers before, you will find Flot familiar in that it just attaches itself to a div and renders into that. With some add-ons you are able to make interactive charts e.g. where you can zoom in and out of the chart, click on elements to find out more about them and so on.
Advantage: A 'natural fit' if you are already using jquery. Also you control everything so no need to worry about dependency on Google services.
Disadvantage: Doesn't have quite the range of charting options that the google API has.
I thought I would take a moment to run through the tools in my digital toolbox that I use to develop GIS enabled web sites. I try to pick the best of breed in each area rather than learn multiple tools that do the same thing – life is short and there isn’t enough time for me to do that. I would be interested to read in the comments if anyone has suggestions of better alternatives:
Operating system: Debian or Ubuntu Server Edition. Really don’t run your web site on Windows, its just a silly waste of time and money.
Web server – Apache 2. It’s a no brainer really, its fast, robust and infinitely configurable while easy to get running in a default configuration.
Programmers editor: Vim (or emacs if you prefer). Being able to use the same editor on both local development machines and remote servers is indispesible. Also if you hand write your html it tends to have less gumpf clogging up the works compared to the Frontpage etc. generated sites I have seen out there. If you must use a GUI editor there are a few good choices under Linux, but VIM does it for me.
Web Application framework: (Geo)Django. With its support for spatial extensions, intuitive MVC architecture and wealth of 3rd party add-ons, Django is a great choice for building your web applications with Python.
Backend Database: PostgreSQL/PostGIS. It does everything you need including store geospatial data. Some people suggest SpatialLite as an alternative, but thus far I have haven’t used it in a production system so I don’t know what limitations, if any, it has.
Javascript Framework: Jquery. I know there are some good competitors but JQuery and JQuery-UI are so great I haven’t felt a need to go and discover their competitors. There are a huge number of add ons for JQuery and plenty of helpful people out there if you get stuck.
CSS Framework: Blueprint CSS. I think CSS frameworks are still a relatively new concept. They take a lot of the pain out of layout and make your site look good with minimal effort. Blueprint implements the 960 grid and the results are pretty much always pleasing on the eye.
CSS Compressor: http://www.csscompressor.com/. This web site will take your CSS and squish it by removing comments, white space etc. It typically makes my CSS files around 25% smaller.
Javascript Compressor: Google Closure. This web service / web app will squash your javascript down nice and small using a variety of techniques. With simple optimisations, I typically get around 40% reduction in code size. It also optimises your code for good measure. They provide lots of detailed documentation to get you on your way.
Web Mapping Control: OpenLayers. It’s a bit of a no-brainer. I haven’t really looked that hard but is there anything that really competes with it (other than the Google Maps API)?
Web Mapping Server: UMN Mapserver. One day soon I am going to replace this entry with QGIS’ own mapserver implementation by Marco Hugentobler, but for now Mapserver is the best thing since sliced bread – it’s a doddle to install, incredible flexible and you can generate basic mapfiles using QGIS so it’s easy to get started with. Also worth a mention is Mapnik which can produce gorgeous maps.
Web Mapping Cache: TileCache. I keep meaning to try out MapProxy since it supports region delimitation using shapefiles rather than bounding boxes – which can drastically reduce the size of your seeded cache. But for now, TileCache is really easy to set up and you should have it running in just a few minutes.
Did I leave anything out? If you take the above tools, software and web services, you will have everything you need to produce some great web mapping software.
I thought I would take a moment to run through the tools in my digital toolbox that I use to develop GIS enabled web sites. I try to pick the best of breed in each area rather than learn multiple tools that do the same thing - life is short and there isn't enough time for me to do that. I would be interested to read in the comments if anyone has suggestions of better alternatives:
Operating system: `Debian`_ or`Ubuntu Server Edition`_. Really don't run your web site on Windows, its just a silly waste of time and money.
Web server - `Apache 2`_. It's a no brainer really, its fast, robust and infinitely configurable while easy to get running in a default configuration.
Programmers editor: `Vim`_ (or emacs if you prefer). Being able to use the same editor on both local development machines and remote servers is indispesible. Also if you hand write your html it tends to have less gumpf clogging up the works compared to the Frontpage etc. generated sites I have seen out there. If you must use a GUI editor there are a few good choices under Linux, but VIM does it for me.
Web Application framework: `(Geo)Django`_. With its support for spatial extensions, intuitive MVC architecture and wealth of 3rd party add-ons, Django is a great choice for building your web applications with Python.
Backend Database:`PostgreSQL/PostGIS`_. It does everything you need including store geospatial data. Some people suggest SpatialLite as an alternative, but thus far I have haven't used it in a production system so I don't know what limitations, if any, it has.
Javascript Framework: `Jquery`_.I know there are some good competitors but JQuery and JQuery-UI are so great I haven't felt a need to go and discover their competitors. There are a huge number of add ons for JQuery and plenty of helpful people out there if you get stuck.
CSS Framework: `Blueprint CSS`_. I think CSS frameworks are still a relatively new concept. They take a lot of the pain out of layout and make your site look good with minimal effort. Blueprint implements the 960 grid and the results are pretty much always pleasing on the eye.
CSS Compressor: http://www.csscompressor.com/. This web site will take your CSS and squish it by removing comments, white space etc. It typically makes my CSS files around 25% smaller.
Javascript Compressor: `Google Closure`_. This web service / web app will squash your javascript down nice and small using a variety of techniques. With simple optimisations, I typically get around 40% reduction in code size. It also optimises your code for good measure. They provide lots of detailed documentation to get you on your way.
Web Mapping Control: `OpenLayers`_.It's a bit of a no-brainer. I haven't really looked that hard but is there anything that really competes with it (other than the Google Maps API)?
Web Mapping Server: `UMN Mapserver`_. One day soon I am going to replace this entry with QGIS' own mapserver implementation by Marco Hugentobler, but for now Mapserver is the best thing since sliced bread - it's a doddle to install, incredible flexible and you can generate basic mapfiles using QGIS so it's easy to get started with. Also worth a mention is Mapnik which can produce gorgeous maps.
Web Mapping Cache: `TileCache`_. I keep meaning to try out MapProxy since it supports region delimitation using shapefiles rather than bounding boxes - which can drastically reduce the size of your seeded cache. But for now, TileCache is really easy to set up and you should have it running in just a few minutes.
Did I leave anything out? If you take the above tools, software and web services, you will have everything you need to produce some great web mapping software.
We still have a few days left to vote on what you would like the kCube Developer time to be spent on. Here is what the poll is looking like thus far. Go along and cast your vote if you haven’t already done so!
We still have a few days left to vote on what you would like the kCube Developer time to be spent on. Here is what the poll is looking like thus far. Go along and cast your vote if you haven't already done so!
This month we have been wrapping up the work we have been doing for GBIF – the Global Biodiversity Information Facility. The aim of the project was to create a user friendly plugin for QGIS that provides openModeller functionality from within the QGIS environment. In addition, we implemented various other tools to enable Biodiversity Informatics activities to be carried out within QGIS. Some of these tools have made their way into QGIS trunk, such as the new raster calculator tool.
It’s quite interesting actually that the reason I started hacking with QGIS in the first place was that I wanted to be able to visualise ecological niche models in QGIS. One of the first things I did when support was added for C++ plugins was to create a simple openModeller plugin. That work was shelved in favour of creating the openModeller Desktop application as we wanted a richer, niche modelling centric environment. So it was something of a return to origin to be reimplementing openModeller as a plugin. This time around the plugin provides much richer functionality (including the ability to project models into different climate scenarios) and provides a more natural way for a GIS user to embark on their first steps into the world of ecological niche modelling.
The installer we created is for Windows, and is based on the 1.6 installer, with some changes from the development version of QGIS included and extra tools and plugins bundled in. We have made a series of training videos to accompany the software (see below) – you may have seen them popping up in my YouTube channel.
The first video shows how to perform the basic installation and enable the openModeller plugin.
The second video shows how to run an ecological niche model in the most basic way.
The third video shows how to use layersets to project the niche model into a future climate scenario.
The final video shows how to use the raster calculator to produce a predicted change map between present and future scenarios.
The sample data used in the videos can be downloaded here (its around 14mb). The installer itself is available here:
http://linfiniti.com/downloads/QGIS-17-Dec-2010-TZ-Setup.exe
It’s around 105mb to download.
This is a first release of the software and we welcome you to try it out and let us know if you encounter any issues.
I would like to thank GBIF for funding this project and Costech / TanBIF for hosting us on our visits to Dar es Salaam. We had a great time doing this work and look forward to integrating more tools and training more people to use it further down the line!
This month we have been wrapping up the work we have been doing for GBIF - the Global Biodiversity Information Facility. The aim of the project was to create a user friendly plugin for QGIS that provides openModeller functionality from within the QGIS environment. In addition, we implemented various other tools to enable Biodiversity Informatics activities to be carried out within QGIS. Some of these tools have made their way into QGIS trunk, such as the new raster calculator tool.
It's quite interesting actually that the reason I started hacking with QGIS in the first place was that I wanted to be able to visualise ecological niche models in QGIS. One of the first things I did when support was added for C++ plugins was to create a simple openModeller plugin. That work was shelved in favour of creating the openModeller Desktop application as we wanted a richer, niche modelling centric environment. So it was something of a return to origin to be reimplementing openModeller as a plugin. This time around the plugin provides much richer functionality (including the ability to project models into different climate scenarios) and provides a more natural way for a GIS user to embark on their first steps into the world of ecological niche modelling.
The installer we created is for Windows, and is based on the 1.6 installer, with some changes from the development version of QGIS included and extra tools and plugins bundled in. We have made a series of training videos to accompany the software (see below) - you may have seen them popping up in my YouTube channel.
The first video shows how to perform the basic installation and enable the openModeller plugin.
The second video shows how to run an ecological niche model in the most basic way.
The third video shows how to use layersets to project the niche model into a future climate scenario.
The final video shows how to use the raster calculator to produce a predicted change map between present and future scenarios.
The sample data used in the videos can be downloaded here (its around 14mb). The installer itself is available here:
http://linfiniti.com/downloads/QGIS-17-Dec-2010-TZ-Setup.exe
It's around 105mb to download.
This is a first release of the software and we welcome you to try it out and let us know if you encounter any issues.
I would like to thank GBIF for funding this project and Costech / TanBIF for hosting us on our visits to Dar es Salaam. We had a great time doing this work and look forward to integrating more tools and training more people to use it further down the line!
Last week weposted an article about the wonderful donation kCube Consulting are making - 6 months of paid professional developer time devoted to the QGIS project. Based on community feedback, we have put a poll on the QGIS home page and we invite you to cast your vote to say how you think the kCube developer's time should be spent.
Here is the first in a (neverending?) series of screencasts I plan to make showing you how to do common tasks in FOSSGIS and QGIS. If you have requests for further tutorials let me know what you are looking for in the comments below. Enjoy!
Note:Just an update from Martin Dobias (author of the functionality I have demonstrated in the above video) that you don't need to be using trunk to do what I demonstrate in the video 1.5 or 1.6 should work fine too. See comments below. Thanks Martin!
For several years already, companies, public administrations (such as the Swiss Canton of Solothurn GIS department 'SO!GIS') and others have been hiring developers to address their specific needs and then donating any work which is of generic interest back to the QGIS project. This has been a huge boon to the project, but in general this kind of development activity is very focused on the needs of sponsors. This is quite understandable but leaves many of the more tedious aspects of the QGIS work up to the group of volunteers that form the heart of the project.
I have often fantasized about being sponsored to 'just do good stuff' on QGIS so that I could work on writing and cleaning up the API documentation, writing unit tests, improving usability and so on - things that I typically wouldn't be able to pass on as a cost to a client looking for a specific feature. In parallel, I have often thought how great it would be if organisations started donating hours, days or months of developer time (their own developers or sponsoring community members) to the project to help to improve it in a general sense without following the particular mandate of a client.
In fact I can see several advantages for organisations who take this route:
In the light of the above, I was pleasantly surprised to receive an email in my inbox this week from Kumaran Narayanaswamy of kCube Consulting:
Hello Tim,
How are you doing?
I would like to let you know that one of our developers is available full time for core QGIS Development tasks. Do you have any task priority list or enhancement list? He can work with the core development team and contribute for the development. Please let me know your thoughts and how to take this forward. Thanks for your time.
Regards
Kumaran
Wow! Of course that set my brain of in a million directions at once - there are so many things we want to do in QGIS, where to start? Kumaran and I sent a few messages back and forth, and he is quite amenable to opening the decision making process to the community. Just to clarify, kCube are offering the services of a full time paid developer (C++ or python) to the QGIS project to work on whatever we see fit for six months, starting in Jan 2011.
To get things rolling I have created a wiki page where anyone with an OSGEO login can add their ideas. We will take the unique and plausible ideas from the list and we will hold a poll to see which ideas are most sought after from the community, and use the results to help us decide what to prioritise for the kCube developer. We look forward to reading your ideas! Needless to say, a huge THANK YOU to Kumaran andkCube Consulting for this awesome offer - we appreciate it and will make the best possible use of it!