Archive for the 'geospatial' Category

Getting to know PostGIS Part II

So its been over six months since I made my first tutorial post about PostGIS. I now use PostGIS on a regular basis and thought it would be good to update the tutorial with some meat on how to use PostGIS.

Get some data and import it

Grab populated places points

wget http://edcftp.cr.usgs.gov/pub/data/nationalatlas/citiesx020.tar.gz

Grab US counties map:

wget http://edcftp.cr.usgs.gov/pub/data/nationalatlas/countyp020.tar.gz

Lots more data available in the National Atlas
Continue reading ‘Getting to know PostGIS Part II’

Using OGR to convert GIS Vector formats

OGR is a part of GDAL and is very useful for converting between geospatial vector formats. What does that mean? When storing Vector GIS data there are a dizzying number of formats it can be stored in, some of the more popular of late, or at least well known are KML and SHP. A friend of a friend was looking to convert some SHP (Shapefiles) into KML so that he could make a Google Maps mashup and I helped him out. Here is a workflow for how I went about performing the conversion.
Continue reading ‘Using OGR to convert GIS Vector formats’

Getting to know PostGIS

I am making the plunge to get more informed with how to use PostGIS. It is pretty impressive so far. Here is a quick tutorial which shows you how to get started and loading in a shapefile to play around with some fun SQL querying. I assume a basic understanding of the linux command line and some basic SQL skills.

To get started in ubuntu 7.04 (should work in 7.10 and debian too):

$ sudo apt-get install postgis postgresql-8.1-postgis

Next we’ll start setting up the PostGIS environment.
Continue reading ‘Getting to know PostGIS’

Woowee…

The blog is getting mighty impersonal with all those del.icio.us posts. Maybe that can serve as a reminder for me to post more.

I have been hacking on a bunch of convenience code in python for the LTM (Land Transformation Model) which serves as the land use projection portion of my research. Basically just wrapping a bunch of ArcGIS functions that do what I need done and then some file manipulation and config file writing before I launch code written by our postdoc. Going to try and do some time projections for all of the state of Indiana and then go back to my Muskegon study area with the new tools to re-run the model up there. It should make things run much more smoothly.

geopy

Stumbled upon geopy while looking through a fantastic list of OSS and Linux GIS tools.

Geopy lets me code a geocoder in 6 lines of python using the google maps API.

Continue reading ‘geopy’