-1

This seems like a completely useless information but i would like to know if there is some kind of mechanism which lets me get the approximate vegetation of a location.

I want to know if I am inside a City, or in a desert, or if I'm currently in the woods, or on the see.

Also is there a chance to get the nearest lake of sea?

This seems a bit of an odd question...and I hope you understand what I'm looking for.

Thank you very much

Johnnycube
  • 1,060
  • 1
  • 10
  • 25
  • There might be, but not using the current Google Map APIs – Eli Algranti Oct 24 '12 at 22:39
  • For the forest, maybe you could try to extract color statistics from a map showing where you are. A simple test would be "If the green is the dominant color in the map around me, there is more chance that I am currently in a forest than in a city". If you manage to extract that information from a location, you could build a statistical approach to make your results more consistent. – yumyum Oct 24 '12 at 22:47
  • how is this an android question? – toadzky Oct 24 '12 at 22:49
  • I want to do this on a Android phone. @yumyum - that was an idea i tried to follow but i hopped there would be an elegant or even built in way of doing it – Johnnycube Oct 24 '12 at 23:01

1 Answers1

2

This is difficult to do because of a lack of readily available data accessible from Android, but I think your best bet is to use a crowd-sourced dataset such as OpenStreetMap (OSM).

You'd need to set up your own spatial database (e.g., PostGIS) and import OSM data into the database.

OSM standardizes multiple vegetation label types, including:

  • natural=bare_rock
  • natural=fell
  • natural=glacier
  • landuse=grass
  • natural=grassland
  • natural=heath
  • natural=mud
  • natural=screen
  • natural=sand
  • natural=scrub
  • natural=tree
  • natural=wetland
  • natural=wood.

See the OSM - Natural - Land Cover wiki page for more detail on OSM labels of vegetation.

Then, you'd create a server-side API (hosted in a web server such as Tomcat or Glassfish) to receive the mobile phone's current location, do a spatial query via PostGIS to determine the polygon and natural land cover type (i.e., vegetation) the phone's location lies within, and return the vegetation type to the phone.

Another option is to use ESRI shape files instead of OSM data, and load this data into the PostGIS database.

Community
  • 1
  • 1
Sean Barbeau
  • 11,496
  • 8
  • 58
  • 111