Avid Geo’s October Meetup is right around the corner. The details haven’t been nailed down yet, but the tentative date is October 18th starting at 6:30.
Geo-Details to follow…and check out last month’s meetup now on YouTube.
Data, Analysis, Spatial, Code, Running, Boston
Avid Geo’s October Meetup is right around the corner. The details haven’t been nailed down yet, but the tentative date is October 18th starting at 6:30.
Geo-Details to follow…and check out last month’s meetup now on YouTube.
Avid Geo will be holding it’s monthly meeting for August this coming Thursday at Dogpatch Labs in Cambridge. Unfortunately I can’t make this month’s meeting but it looks to another good one. David Zwarg, from Azavea will be talking about PostGIS raster formats and supporting GDAL drivers. I’ve seen David speak a couple times now and its always about some pretty interesting stuff. So, if you are into PostGIS, GDAL, and like “talking shop” with some people in the know then head over to Cambridge this Thursday!
One of my New Year’s resolutions was to contribute to OpenStreetMap more often. I started out 2012 by mapping my hometown, as the city I currently live in already has very good coverage. My next mapping challenge was to map my undergraduate Alma mater, Keene State College in beautiful Keene, New Hampshire. When I started the mapping project I was surprised about the lack of mapping data contributed for the college and city!
With essentially a blank sheet I used JOSM to digitize (what geographers call tracing) the pathways, parking lots, and athletic fields using the Bing Imagery as a reference layer, while adding a few placemarkers throughout the campus, and finally altering the existing road vector attributes to correctly reflect what was on the ground. These low-hanging fruits quickly spruced up the map:
The next step was the hardest (not that it was mentally challenging, just that it involved several steps). I wanted to add all the buildings on campus to the map so the services that now rely on OpenStreetMap had the most accurate representation of the campus as possible. Anyone who has ever been apart of a digitization project knows that creating a somewhat planimetric building layer can be a tedious task. Basically, I didn’t want to digitize all the buildings, so I went searching for a layer with the buildings already digitized for me. After searching the KSC website (and source code) I extracted the geojson layer from KSC’s campus map. I then opened the geojson layer into Quantum GIS and exported the data to a shapefile. From this point I converted the shapefile into the OSM format using Merkaator and completed the editing using JOSM. (Side note: If anyone knows if it is possible to import a shapefile into JOSM let me know!) With the buildings now available in an OSM format I could edit the data through JOSM.
After a couple hours of tweaking the original building footprints (including moving the footprints to the rooftop outline, not the oblique outline) and editing some other features I wrapped-up my mapping session with the latest version of KSC’s OSM contribution:
I think most will agree that a couple hours contributing and editing data can drastically improve any part of OpenStreetMap, but there is a larger message here for higher-ed GIS and geo-educators. Having students in GIS and geo-classes contribute to a campus’ OpenStreetMap can be a great educational tool. I graduated from KSC eight years ago. How come a geo-savy student or geo-class didn’t do this over the course of the past few years?!?!
There are plenty of schools that have excellent data in OpenStreetMap (Example 1,Example 2, Example 3, Example 4, Example 5), but there are just as many schools (that have geography departments or GIS programs!) whose OpenStreetMap campus map could be improved very easily (Example 1, Example 2, Example 3, Example 4, Example 5)!
If you are a higher-ed geo-educator check out your campus’ OpenStreetMap and get your students to contribute. They’ll learn about GIS, VGI, and open source while your campus map, and potentially community map, improves! Everyone wins!
Next, maybe I’ll map my graduate school Alma mater so I can take it off the bad examples list!
I took today off from work to catch up on a couple things, including installing Postgres 9.1 and PostGIS 2.0 on my home machine. Lately, I’ve been neglecting how I manage my geo-data on my home machine for my personal projects and I told myself it was time for an upgrade. The recent release of PostGIS 2.0 was good motivation for this project as well!
I was planning a couple hours from start to finish for this project, and did I over estimate the time it would take! After I downloaded, installed and configured Postgres 9.1 for a 64 bit Windows machine and ran the StackBuilder to install PostGIS 2, I had everything configured within a hour (and that includes me watching several random YouTube videos!).
I then used the handy shapefile loader to batch load a few global datasets and voila, PostGIS 2.0 data in Quantum:
It has been a really good year for the OpenGIS community so far, and the release of PostGIS 2 should really keep the momentum going. I haven’t been a Postgres or PostGIS power user for a couple years now, but I hope to get back on track soon, exploring all the new features of PostGIS 2.0.
We should be very thankful to the community of developers who create and maintain these amazing tools and applications, who then give them away for free! If you are a GIS aficionado and you don’t have PostGIS, Quantum, TileMill or any other open source GIS tools go and install a couple of them and test them out.
Often, when performing spatial analysis, one may need to execute some type of sampling across space. For example, one may need to sample locations across a geographically continuous surface (think soils, anything weather related, etc.). A spatial random sample can be used to select locations without bias. With a simple python script one can develop a spatial random sample with relative ease. In this post I will cover a few definitions, provide a code sample, and discuss some additional points.
First, a few definitions:
Random Number: A number chosen as if by chance from some specified distribution such that selection of a large set of these numbers reproduces the underlying distribution.
Statistical Randomness: A numeric sequence is said to be statistically random when it contains no recognizable patterns or regularities; sequences such as the results of an ideal dice roll, or the digits of π exhibit statistical randomness.
Simple Random Sample: A sample in which every element in the population has an equal chance of being selected.
Second, what is a spatial random sample?
Spatial Random Sample: Locations obtained by choosing x-coordinates and y-coordinates at random (p. 58). Any points that do not intersect the landform will be dropped from the list of random points.
Third, give me some python code to do this!
import os, random from time import strftime f = open("C:\\Data\\output\\spatial_random_sample.csv", 'w') #How many points will be generated numpoints = random.randint(0,1000) # Create the bounding box #set longitude values - Y values minx = -180 maxx = 180 #set latitude values - X values miny = -23.5 maxy = 23.5 print "Start Time:", strftime("%a, %d %b %Y %H:%M:%S") #Print the column headers print >>f, "ID",",","X",",","Y" for x in range(0,numpoints): print >>f, x,",", random.uniform(minx,maxx),",", random.uniform(miny,maxy) f.close() print "Script Complete, Hooray!", numpoints, "random points generated" print "End Time:", strftime("%a, %d %b %Y %H:%M:%S")
This quick, dirty and very simple script does a few things. First, it creates a csv file in a local directory, and by using the ‘w’ mode the file will be created if it doesn’t exist and will be overwritten every time the code is run (so be careful).
Next, the code selects a random number of points to be generated. In this case it will be a random integer between zero and 1,000. The user will then set the bounding box for which the points will be contained by. If using ArcPy and ArcGIS the user could easily set the bounding box to that of a particular layer. In this example, it is simply 180,-180 and the approximate Tropic of Cancer and Tropic of Capricorn.
The next block of code will generate the random number of points in the specified ranges and print them to a csv file. The output is fairly straight forward: three columns, an ID field and X and Y. The user can open the file in OpenOffice as they could any other csv file.
Well, that’s great. With this data the user can easily visualize it in Quantum using the Add Delimited Text Layer tool from the Layer menu. Since the output was formatted with X and Y fields the tool will populate itself:
Once the user clicks OK the points will be added to the map. From there the user can export the data to any number of formats and perform their analysis.
As you can see it is pretty easy to generate random points with the script. In fact, ArcMap and Quantum have tools that will do this, but both run much slower than just creating a simple spatial random sample as demonstrated here, as they have many more options than this simple script. Also, the Arc version will only work if the user has ArcEditor or the spatial analyst extension. The folks at SpatialEcology also have a tool that will do this within ArcMap as well, and I am sure there are other tools out there as well.
But before we wrap this up, here are a couple notes:
There once was a well know GIS blog post that compared geographic information systems to word processors. No matter what you think about the post we will always need people who are skilled at “writing” and have something to “write” about.
As I have said before, and will say again, if you are using GIS technologies you should have a grasp on the fundamentals. You wouldn’t write a paper or a report without a grasp on the basics of the topic or without a knowledge of writing in general. So, to improve the world’s GIS grammar (or at least my own), I will be posting a number of spatial analysis related topics over the course of the next few months. Here are a few of the topics I will cover:
I’ll use a variety of software, data, and problems to explain these topics, in order to expose the reader to the broad language of GIS.
Two quick articles for your reading pleasure:
OSM Movement Gaining Steam Due to Google’s Fees – NY Times
Esri Throwing more Support Behind OSM – Directions Magazine
Now, do your part and start contributing. If everyone who reads this post takes an half hour to improve OSM in their home town the world will be a better (mapped) place.
What are you waiting for! Go map!
The year of OpenStreetMap continues. You have probably heard by now that Apple is now using a mix of TIGER data and OSM tiles in their mapping application. As I said a couple weeks ago, 2012 is the year of OpenStreetMap, and this change for Apple, who had been using Google’s mapping data, is the biggest switch to date.
As I have said before, when large, well established organizations switch to these open data sources it can have a major impact on the open data movement, and Apple is probably as big as it gets. However, Apple could derail the momentum that is the Year of OpenStreetMap!
The rumor on the street (haha, get the pun!) is that Apple is using an older set of tiles and TIGER data (yes, that TIGER). These older datasets aren’t perfect and anyone who has ever taken a GIS course knows that TIGER data should be used for reference purposes only, and not in a global application that will potentially have millions of users. Now, why would Apple be using this older data? Are we seeing a beta product while they get ready to push new tiles out soon? Do they not have any well trained geographers or GIS pros working for them who know about data quality? Are they not taking their mapping applications seriously?
If OpenStreetMap data is to be successfully integrated into an application the users of that application will need to trust the quality of the data. If the most influential tech company in the world messes this up it could impact who joins the OSM movement next, and perhaps set the movement back.
For more details on the switch and the data issues check out what SlashGeo had to say, James Fee’s comments, and this article from Geek.com.
A few motivated indivduals have created some really great mash-ups that display the new Apple tiles. Check them out for yourself to compare what currently exists in OSM and what Apple has published:
And one last comment. Apple’s map visualization scheme is horrible. Of all the great basemaps out on the web and Apple designs a visualization scheme that just screams 2001. Maybe it’s being optimized for mobile devices, but as a trained cartographer I think it looks bad.
Full disclosure. I am not an Apple person. I have a Dell laptop, a Samsung phone, and an old IPod.
On February 28th, 2012 I (yesterday), I posted a blog titled “2012 -The Year of OpenStreetMap”.
In the post I said that “the next “big” mapping application that hits the market will be have an OSM back-end.” Well, well, well, talk about timing. Today, FourSquare announced that they will be switching to OSM for their mapping back-end using MapBox. Pretty cool.
If you get a minute take a gander at the comments in the FourSquare blog post. There is a mixed reaction to the switch, which I can understand. There are also a number of really good suggestions that FourSquare could take a look at too. Just like when any social network incorporates a design change there will be some push back from the users. But, with time the OSM footprint will improve, as the community will grow, mature, and produce better maps. People seem to forget that early on Google Maps wasn’t perfect and had data gaps as well. FourSquare would be smart to somehow encourage OSM mapping parties and promote what is now being called the OpenStreetMap movement!
February 28, 2012. You heard it here first. 2012 – The Year of OpenStreetMap. What will be next!
OpenStreetMap has been in the news a lot lately, and rightfully so.
Has the geospatial world reached the tipping point? Are users, developers, and society as a whole now more accepting of open-source spatial information? Are we now confident in the crowd sourced masterpiece that is OSM?
Yes, yes, and yes.
So, now two full months into 2012 I’m calling it. 2012 is the year of OpenStreetMap. But why now? I think it is due to a few reasons:
So, there you have it. I think you’ll hear a whole lot more out of OSM in 2012, whether it is about new and exciting applications built using their data, or companies switching their services from one of the major players to OSM.
There it is, my reason calling 2012, the Year of OpenStreetMap…two months late 🙂
Now, go host a mapping party!