<html style="direction: ltr;">
<head>
<meta content="text/html; charset=windows-1255"
http-equiv="Content-Type">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="preferred-charset"
bgcolor="#FFFFFF" text="#000000">
On 09/29/2012 10:40 PM, Lars Dalby wrote:
<blockquote cite="mid:1348951258487-5005355.post@n6.nabble.com"
type="cite">
<pre wrap="">Hi Micha
Thanks a lot for your detailed response! Much appreciated.
Micha Silver wrote
</pre>
<blockquote type="cite">
<pre wrap="">If I understand your task, you want to
* import the GLWD lakes polygon shapefile into GRASS
* reproject to a projected CRS
* create a GRID with cell size about 92 km. X 92 km, and
* sum up the area of lakes within each grid cell.
</pre>
</blockquote>
<pre wrap="">
Correct, that's exactly what I am trying to do!
Micha Silver wrote
</pre>
<blockquote type="cite">
<pre wrap="">First I downloaded the polygon shapefile you linked to. THen I started
GRASS in a WGS84 based LOCATION, and used:
# Use the '-o' option since the downloaded shapefile does not have a *.prj
v.in.ogr -o dsn=glwd_2.shp out=glwd
</pre>
</blockquote>
<pre wrap="">
Yep, that also what I did.
Micha Silver wrote
</pre>
<blockquote type="cite">
<pre wrap="">Next I restarted GRASS and created a new location based on the EPSG code
3925. This is NOT World Behrmann, but it's a cylindrical equal area
projection with meters as units, like Behrmann. I couldn't find any
proj4 reference to Behrmann :-(
</pre>
</blockquote>
<pre wrap="">
I know, it is actually a bit surprising because it is quite commonly used,
at least in large-scale ecology which is my field of study. I have defined
the location myself so not a big problem. Anyhow, the steps needed in this
example does not really depend on a specific projection, so it should work
just fine no matter what projection is being used.
Micha Silver wrote
</pre>
<blockquote type="cite">
<pre wrap="">At this step, I made sure to set the default database connection to
sqlite. (This is important later to aggregate the water body areas in
each grid cell.):
eval `g.gisenv`
db.connect driver=sqlite
database=$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db
</pre>
</blockquote>
<pre wrap="">
I was able to excecute the db.connect command and I guess that I don't have
to use eval `g.gisenv` when I am running the commands via R?
Micha Silver wrote
</pre>
<blockquote type="cite">
<pre wrap="">Now:
v.proj in=glwd loc=
<the WGS84 LOCATION>
map=
<the previous MAPSET>
</pre>
</blockquote>
<pre wrap="">
I did this step earlier also, but redid it here because the database
connection was changed.
Micha Silver wrote
</pre>
<blockquote type="cite">
<pre wrap="">Next step, I created a grid using v.mkgrid. I limited the region to just
Africa so things would move along a little faster. So something like:
# Create a vector grid with size 92,000 meters by 92,000 meters
v.mkgrid --o grid92 position=coor coor=-2000000,-5000000 box=92000,92000
grid=140,85
# I got the 'grid=' parameters by dividing the length and width by 92,000
</pre>
</blockquote>
</blockquote>
<br>
<blockquote cite="mid:1348951258487-5005355.post@n6.nabble.com"
type="cite">
<pre wrap="">
So, this is as far as I could get in this round. When I'm running this
command I get an error message: "Parameter <coor> does not have float
value". I figure that this means that my coor values are not floating
points. They look like this: coor = -6358820,-17367529. Shouldn't that be
ok?</pre>
</blockquote>
<br>
Can you copy/paste your exact command? I think there should not be
any space between 'coor' and '='.<br>
<br>
<blockquote cite="mid:1348951258487-5005355.post@n6.nabble.com"
type="cite">
<pre wrap="">
Hmm..., not sure what to do here.
Any hints?
Best
Lars
--
View this message in context: <a class="moz-txt-link-freetext" href="http://osgeo-org.1560.n6.nabble.com/Rasterize-polygons-multiple-polygons-per-grid-cell-tp5005264p5005355.html">http://osgeo-org.1560.n6.nabble.com/Rasterize-polygons-multiple-polygons-per-grid-cell-tp5005264p5005355.html</a>
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</a>
This mail was received via Mail-SeCure System.
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Micha Silver
GIS Consultant, Arava Development Co.
<a class="moz-txt-link-freetext" href="http://www.surfaces.co.il">http://www.surfaces.co.il</a></pre>
</body>
</html>