views:

89

answers:

2

I am not quite sure where to start with this. I only just started looking into this in the past week, but hopefully someone can help point me in the right direction.

The goal of my project is to be able to take a geohash, decode it to latitude and longitude, check the point against some GIS data, and find out some information about that point such as the terrain(is this a body of water? A lake? An Ocean? Is this a mountainous area? Is this a field?), altitude, or other useful things. Then simply be able to display that information as a starter.

What I have gathered so far is that I need to get some free GIS data (this is for school, so I have no money!). I would like to have world data, and I found some online (http://www.webgis.com/terraindata.html) but I don't know where to go from here. I saw some tools such as PostGIS as a database.

I am currently using Java for some other parts of the project, so if possible I would like to stick to Java.

Can someone help me out, or point me in the right direction?

A: 

Look at the SRTM data sets. There are various versions for various levels of accuracy (and size). You get data in raw format, you will have to interpret it yourself, but it's not hard. It is very well documented.

jer
+3  A: 

Start out looking at PostGIS; it happens to be in C but developed by otherwise mostly Java guys, and supports nice (free) Java tools, such as uDig.

As to the geospatial fundamentals: here is an example of some of the interactions I get the feeling you need to get started.

You start with a data source, say the free TIGERLINE census data in the US. Using GDAL you format the data for your database; generally you can pipe shapefiles, kml, etc., directly into a table that will have some metadata (place names, etc.) and the key spatially enabled geometry column. Here I really recommend PostGIS. I have just such a census-derived table on my laptop, here is how you work with it in your bodies of water example:

pepe=> \d tl_2009_06075_areawater
   Table "public.tl_2009_06075_areawater"
  Column  |          Type          |
----------+------------------------
 gid      | integer                |
 ansicode | character varying(8)   |
 hydroid  | character varying(22)  |
 fullname | character varying(100) |
 the_geom | geometry               |
Indexes:
    "tl_2009_06075_areawater_pkey" PRIMARY KEY, btree (gid)
Check constraints:
    "enforce_srid_the_geom" CHECK (st_srid(the_geom) = 4269)

Take note of the number 4269, that is the geometry's SRID.

Now say you have a point, for example -122.492983 37.717753 (note it's Longitude Latitude), given by a GPS input or whatever. What body of water might it be in?:

pepe=> select fullname from tl_2009_06075_areawater 
where the_geom &&
ST_GeomFromText('POINT(-122.492983 37.717753)', 4269);

   fullname    
---------------
 Lk Merced

 Pacific Ocean

Lake Merced is a place in San Francisco I walk past all the time -- it is a bit of a tidal marsh so maybe the Census Bureau considers it part of the Pacific Ocean -- interesting, I didn't know that! Hope this helps get you started.

bvmou
Thanks so much for the detailed response, I finished downloading the files using wget, (I probably should just start with a small sample but oh well) and I'm now in the process of unzipping them. Once I finish that I'll import them to PostGIS and give some of this a try. I'll let you know how that goes within a couple of days.
Patrick Scott