Below you will find pages that utilize the taxonomy term “Qgis”
March 31, 2012
Conditionals in the QGIS raster calculator
I needed to do some conditionals in the QGIS raster calculator, but it doesn’t support that—or at least doesn’t seem to. But it does support logical operators, with a result of either 0 or 1. For instance, here’s the script I wrote:
Of course, you can’t actually put the comments in. But what it does is this: First, I subtract one raster from the other and multiply that by the logical operation that neither one contains NoData.
read moreMarch 3, 2012
Conditional Labels in QGIS
I fairly commonly find myself in a situation where I would like to display one label for certain features and another for other features in the same layer. QGIS doesn’t have an official way to split labels up into categories, and until now I’d resorted to having two layers to render otherwise identical features. But, in the new, excellent expression based labeling from Nathan Woodrow, I realized one can use an SQL CASE statement.
read moreFebruary 2, 2012
More Basemaps in QGIS
One of the more popular posts on this blog has been my piece on adding basemaps to QGIS. While the OpenLayer plugin is great, one of the things that I find dissatisfying is that it requires reprojecting your data to match the EPSG:3857 basemap. I often work in State Plane, and I’d just as soon have my data stay in that projection, which will also minimize local distortion. Well, as it turns out, one can add tiled map services as GDAL raster layers, with all the benefits that entails (e.
read moreDecember 30, 2011
Transit to Everywhere
Data courtesy MapQuest and OpenStreetMap CC-BY-SA, the City and County of San Francisco, and Bay Area Rapid Transit
This is an overlay of the transit and walking trip plans generated by OpenTripPlanner from Powell and Market to every other intersection in San Francisco, after Eric Fischer’s map of walking routes to every intersection in San Francisco. It brings out the transit routes but also shows well-used walking routes. The lines do not vary in width (don’t let Market Street fool you, it’s actually several lines—BART, MUNI rail in 2 directions, Muni bus, walking—very near each other).
read moreJuly 25, 2011
Accessing GTFS Data in QGIS
When you load GTFS data into PostGIS using gtfsdb, you can’t access that data in QGIS because the tables don’t have a primary key in int4 format (the primary key is in text format).
If your transit system uses numeric ids in text format, an easy fix is running this against each of your tables:
ALTER TABLE stops ADD COLUMN gid int; UPDATE stops SET gid = stop_id::int; ALTER TABLE stops ALTER COLUMN gid SET NOT NULL; ALTER TABLE stops ADD CONSTRAINT stops_gid_uniq UNIQUE(gid); What this does is creates an integer ID field, populates it with the stop_id (or shape_id, &c.
read moreMay 28, 2011
Installing QGIS-1.7 on Fedora
The QGIS instructions for building from source are targeted at Ubuntu, but they translate fairly well to Fedora. Here’s a quick guide:
Instead of preparing apt as they say, use yum or Package Manager to install these packages:
cmake bison flex grass-devel geos-devel PyQt4-devel gsl-devel qwt-devel gdal-devel There may be few that I already had installed on my system and missed; if you run configure below and find missing dependencies, run yum search <whatever> in a terminal to look for it.
read moreApril 21, 2011
Blog to Watch: Under Dark
If you’re interested in Open Source GIS and especially QGIS, I highly suggest you give the blog “Under Dark” a read - the author seems to be very clued in the latest developments, and the blog is very active.
read moreApril 6, 2011
Basemaps in QGIS
**Update 2012-02-02 17:57 -0800:I just wrote a post about another way to do this.
I really like QGIS. It’s a powerful GIS that runs on Linux (among other operating systems) and doesn’t require incredible amounts of CPU. One criticism I had of it was that it did not provide the same ‘click-and-go’ basemap experience one can get with ArcGIS for making simple maps (i.e. Add Basemap, select Bing, DeLorme, &c. and you’re done).
read more