Re: [GRASS-user] How to create 500m DEM from 90m DEM

2012-01-01 Thread SGW00412
Dear Markus and all

> Of course - the vector is just used to find the target area of
> the raster map.

Yes, I understood it. Thanks.

So, at web site grass manual, I found 'r.resamp.interp' command.

When I would like to create this under same datum and projection 
with only difference resolutions, then may I use this command ? 

for example;

g.region rast= -p

...0:00:03

g.region res=0:00:17 -p

r.resamp.interp input= output=
r.to.vect input= output=<>
..??

Best
Yasuo shimada:Japan weather association.

Markus Neteler さん:
> 2012/1/1  :
> > Dear Micha and all
> >
> > Thank you for useful suggestions!
> >
> > I studied new vector extent with v.in.region, and interpolation should be 
not
> > vector but raster.
> 
> Of course - the vector is just used to find the target area of
> the raster map.
> 
> See also
> http://grass.osgeo.org/grass64/manuals/html64_user/r.proj.html
> -> v.in.region method
> 
> Best
> Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] R.proj Problems Creating Table

2012-01-01 Thread Dave Kindem
Markus,

Checking the database connection helped me identify the actual problem, which a 
bad VAR file in the location.  Once I got rid of it and reconnected, r.project 
was able to create a new table.

Dave

Dave Kindem
dkin...@gmail.com
616.402.0864

On Jan 1, 2012, at 2:47 PM, Markus Neteler wrote:

> 2012/1/1 Micha Silver :
> ...
>> Probably you have to first create an empty sqlite database.
> 
> This should happen automatically. If not, I would consider it a bug.
> 
> Does any other Mac, OS X 10.6.8 user have such a problem that
> the sqlite.db is not created automatically?
> 
> Markus

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] GRASS doesn't find rasters after renaming mapset

2012-01-01 Thread Daniel Lee
Hi there,

Happy New Year's first of all :)

Something strange is happening when I rename mapsets. I'm running GRASS
6.4RC2 on OpenSUSE 12.1 64-bit. Often, when I rename a mapset - not always,
but often - the rasters are no longer recognized. When I press CTRL+L to
load layers, it also doesn't work. I get the following error:

Traceback (most recent call last):
  File "/opt/grass/etc/wxpython/wxgui.py", line 1276, in
OnAddMaps

dialog = gdialogs.AddMapLayersDialog (parent = self, title =
_("Add selected map layers into layer tree"))
  File "/opt/grass/etc/wxpython/gui_modules/gdialogs.py",
line 864, in LoadMapLayers

self.map_layers = grass.mlist_grouped(type = type)[mapset]
KeyError
:
u'Clearsky'

I'm pretty sure the two phenomena are connected.

Previously, I was able to solve the problem by naming the mapset back to
what it used to be called. Sadly, in this case I don't remember the
original name. Does anybody have a tip as to how I can access the rasters?
g.mremove * finds them, but g.list doesn't. Thanks!

Best,
Daniel

--
B.Sc. Daniel Lee
Geschäftsführung für Forschung und Entwicklung
ISIS - International Solar Information Solutions
Vertreten durch: Daniel Lee, Nepomuk Reinhard und Paul Gaus

Deutschhausstr. 10
35037 Marburg
Festnetz: +49 6421 379 6256
Mobil: +49 176 6127 7269
E-Mail: l...@isi-solutions.org
Web: http://www.isi-solutions.org

ISIS wird gefördert durch die Bundesrepublik Deutschland, Zuwendungsgeber:
Bundesministerium für Wirtschaft und Technologie aufgrund eines Beschlusses
des Deutchen Bundestages, sowie durch die Europäiache Union,
Zuwendungsgeber: Europäischer Sozialfonds.
Zusätzliche Unterstützung erhält ISIS von dem Entrepreneurship Cluster
Mittelhessen, der Universität Marburg, dem Laboratory for Climatology and
Remote Sensing und dem GIS-Lab Marburg.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] LIDAR tools and topology (unable to open ... on level 2)

2012-01-01 Thread Markus Neteler
On Sun, Dec 18, 2011 at 12:12 PM, Markus Metz
 wrote:
> On Fri, Dec 16, 2011 at 7:03 AM, Micha Silver  wrote:
>> I find that after running each of the v.lidar.* the resulting vector lacks
>> topology, so I can't view the categories:
>>
>> i.e. (after v.lidar.correct):
>>
>> GRASS 6.4.2RC1 (ITM):~/GIS/DEM/LIDAR_EinYahav > v.category south_correct
>> opt=report
>> ERROR: Unable to open vector map  on level 2.
>>       Try to rebuild vector topology by v.build.
>>
> Oops. v.category should not really need topology.

For the record: MarkusM has fixed this in trunk in
http://trac.osgeo.org/grass/changeset/49959

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] digitising area crashes GRASS in wx GUI

2012-01-01 Thread Markus Neteler
On Sat, Dec 24, 2011 at 6:12 AM, Shane Litherland
 wrote:
> Hi all,
> this seems to be a serious thing!
>
> wxGUI, ubuntu 10.04, GRASS 6.4.2RC2;

where did you get this from? Self-compiled?

> I created a new vector 'testing_vectors' for troubleshooting.
> obviously it was empty to start with.
>
> I chose 'digitize' from the listbox on top-right of map display window,
> then selected the vector from listbox that appears with digitizing
> tools.
>
> I proceeded to select 'area' tool, and draw an area. when I used the
> right-mouse click to finish/close the area, GRASS crashed (as in all
> windows shut down, disappeared, only the terminal that I used to start
> GRASS was still there, no messages or anything in it).

I have tested the digitizer these days from 6.4.svn and it worked ok.
Martin has done some optimizations in the past 48 hours :)

If you compile yourself, consider to switch to the 6.4.x release branch
version (stable), which continuously receives bugfixes, using
the command:

svn checkout https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4
grass64_release

If you could work with that, we know if there are still unfixed bugs left.

thanks
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.in.gdal | libproj.so.0: cannot open shared object file

2012-01-01 Thread Markus Neteler
On Mon, Dec 19, 2011 at 11:02 AM, soumyo1001  wrote:
> Hi,
>
> I'm running GRASS 6.4.1 on my Fedora 15 system. I've installed all the other
> required libraries and packages. But each time I run GRASS in gui mode and
> start it I get this error : "Unable to get current geographic extent. Force
> quiting wxGUI. Please run manually g.region to fix the problem". I'm not
> able to run GRASS in gui mode.
>
> Also, when I try to run it from text mode and try to create a raster map
> from a sample .jpg file i get this error: "r.in.gdal -o -e
> input=/home/user/grassdata/sample.jpg
> r.in.gdal: error while loading shared libraries: libproj.so.0: cannot open
> shared object file: No such file or directory"

Perhaps you are lacking the package
proj-4.7.0-4.fc15
?

> I'm not able to run GRASS for any good. Please help. Also please mention a
> good book to start working on GRASS.

Here is a list of available books:
http://grass.osgeo.org/gdp/books.php

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] generate thematic map from a raster

2012-01-01 Thread Markus Neteler
On Sat, Dec 31, 2011 at 12:13 AM, Salvatore Mellino
 wrote:
> Hi,
>
> I want to generate a thematic map from a raster. I want to classify values 
> with
> natural breaks method and I want to generate 5 classes and at the end I
> want color them. How can I do?

Do you refer to
http://en.wikipedia.org/wiki/Jenks_natural_breaks_optimization
?

To my knowledge it is not yet implemented in GRASS.

Markus

PS: I found this earlier post in this mailing list archive, perhaps interesting:

On Sat, Nov 1, 2008 at 1:47 AM, Edward Tomlinson  wrote:
> Hi all,
>
> I am not sure as to which list this best fits (Grass or R-sig-geo).
>
> I am trying to reclass a raster map (ndvi) into 5 different zones using the
> fisher method, ultimatley i am trying to reclass as natural breaks.
>
> The point of this exercise is for precision agriculture. I want to determine
> management zones according to the current crop, so i can use this
> information for inputs for next years crop. Therefore i have no use for a
> range of ndvi values -1 thru 1. I need to split this into a number of zones
> (5 or 7 is good number, unless i can get an algorithm to determine the exact
> number of groups it needs). Each zone then in turn needs to be ground
> truthed (hence need for classifying into 5 or 7 zones).
>
> My problem at the moment is that the way i am doing it takes a while... I
> would sure love it if anyone has any suggestions to speed up the process...
> Is it possible to do the reclass bit in R and export the raster
> (SpatialDataFrame) back into grass? I have read a post from Roger Bivand on
> how to do the whole classinterval thing (thank you Roger) however i am
> unsure of how then to create a new image from those values. I have looked
> through the sp package breifly but I dont very well understand the R system.
>
>
> Current method (this has to be done for each paddock, or paddocks can be
> grouped if they have similar management history).
>
> create ndvi
> r.mapcalc 'ndvi=1.0*(nir-red)/(nir+red)'
> move ndvi raster to R
> -R-R-R-
> library(spgrass6)
> G <- gmeta6()
> ndvi <- readRAST6(ndvi@mapset)
> library(classInt)
> t1 <- classIntervals(ndvi$ndvi.mapset, n=5, style="fisher")
> print(t1)
> 
> create text document for reclass rules, multiply everything by 10,000,000
> (as reclass will round my numbers)
> -
> back in grass
> r.mapcalc ndvi_10M = ndvi * 1000
> r.reclass input=ndvi_10M output=ndvi.reclass rules="rules created in text
> doc" title="title"
>
>
> I hope this all makes sense. Thank you for your time and reading through my
> problem. If you have any suggestions i sure would be greatful.
>
> Kind regards,
> Ed
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] R.proj Problems Creating Table

2012-01-01 Thread Markus Neteler
2012/1/1 Micha Silver :
...
> Probably you have to first create an empty sqlite database.

This should happen automatically. If not, I would consider it a bug.

Does any other Mac, OS X 10.6.8 user have such a problem that
the sqlite.db is not created automatically?

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] How to create 500m DEM from 90m DEM

2012-01-01 Thread Markus Neteler
2012/1/1  :
> Dear Micha and all
>
> Thank you for useful suggestions!
>
> I studied new vector extent with v.in.region, and interpolation should be not
> vector but raster.

Of course - the vector is just used to find the target area of
the raster map.

See also
http://grass.osgeo.org/grass64/manuals/html64_user/r.proj.html
-> v.in.region method

Best
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] R.proj Problems Creating Table

2012-01-01 Thread Dave Kindem
Thanks Micha.  I can now create the table.

Dave

Dave Kindem
dkin...@gmail.com


On Jan 1, 2012, at 8:55 AM, Micha Silver wrote:

> On 01/01/2012 15:43, Dave Kindem wrote:
>> 
>> Hello,
>> 
>> I have created a vector layer from a database table in an XY location 
>> (accidents_xy).  Both the topology and a database table (accidents_xy) seem 
>> to have been created correctly.  When I try to re-project the layer into a 
>> UTM location using r.proj, I receive the following error:
>> 
>>> GRASS 6.4.1 (GRGHM_UTM):~ > v.proj input=accidents_xy 
>>> location=InterurbanTest output=accidents_utm
>>> DBMI-SQLite driver error:
>>> Cannot create table:
>>> create table sqlite.accidents_utm ( Name text, cat integer, Longitude 
>>> double precision, Latitude double precision, Type text, Description text )
>>> unknown database sqlite
> 
> Probably you have to first create an empty sqlite database. Check what your 
> db parameters are with: "db.connect -p"
> Then run "sqlite3 "
> Where the path is from the above. Probably by default something like: 
> ~/grassdata/GRGHM_UTM//sqlite.db
> 
>>> 
>>> WARNING: Unable to create table 
>>> WARNING: Unable to copy table 
>>> WARNING: Failed to copy attribute table to output map
>>> Building topology for vector map ...
>>> Registering primitives...
>>> 62 primitives registered
>>> 62 vertices registered
>>> Building areas...
>>>  100%
>>> 0 areas built
>>> 0 isles built
>>> Attaching islands...
>>> Attaching centroids...
>>>  100%
>>> Number of nodes: 62
>>> Number of primitives: 62
>>> Number of points: 62
>>> Number of lines: 0
>>> Number of boundaries: 0
>>> Number of centroids: 0
>>> Number of areas: 0
>>> Number of isles: 0
>>> GRASS 6.4.1 (GRGHM_UTM):~ > 
>> 
>> The topology layer is created and displays (accidents_utm), but there is no 
>> database table.   I am running GRASS 6.4.1 and the Python GUI on a Mac, OS X 
>> 10.6.8.
>> 
>> Thanks for any suggestions about how to resolve the issue.
>> 
>> Dave
>> 
>> Dave Kindem
>> dkin...@gmail.com
>> 
>> 
>> 
>> 
>> This mail was received via Mail-SeCure System.
>> 
>> 
>> ___
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>> 
>> This mail was received via Mail-SeCure System.
>> 
>> 
> 
> 

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] How to create 500m DEM from 90m DEM

2012-01-01 Thread SGW00412
Dear Micha and all

Thank you for useful suggestions!

I studied new vector extent with v.in.region, and interpolation should be not 
vector but raster.

I'll try it, soon.

Best

Yasuo shimada: Japan weather association
---
Micha Silver さん:
> On 01/01/2012 01:38 AM, sgw00...@nifty.com wrote: 
> 
> Dear grass users;
> 
> I would like to create 500m dem from 90m dem (SRTM).
> 
> So, I am going to write a script as follows...is it right ?
> 
> 
> Here's how I would do:
> 1- Import the srtm, set resolution and region to this new raster:
> g.region -p rast=
> 
> 2- Get the current region extents:
> v.in.region out=srtm_region
> THis creates a vector rectangle of the current region
> 
> 3- Now switch to the UTM location, and project the original vector region to 
UTM...
> v.proj in=srtm_region loc= map= out=srtm_region
> ...and reset the current region to that new vector...
> g.region -p vect=srtm_region
> ...but also reset the resolution to 500 m...
> g.region -p res=500
> 
> 4- Now you can run r.proj to reproject the original srtm to your UTM region, 
and it will do the interpolation for you. The following quote is from the 
r.proj 
man page:
> "Note that, following normal GRASS conventions, the coverage and resolution 
> of 
the resulting grid is set  by  the  current region  settings, which may be 
adjusted using g.region."
> ...so...
> r.proj in= loc= map= out=srtm_
raster_utm method=bilinear
> (You can choose which interpolation method to use, See the man page)
> 
> That should do it.
> --
> Micha
> 
> 
> (1)import with 'r.in.srtm' command.
> 
> (2)set resolution with 'g.region' command.
> SRTM is 90m resolution...
> 
> (3)exchagen a projection from latlon_wgs84 to utm_xx with 'r.proj' command.
> ( because initial projection of SRTM data is latlon_wgs84...)
> 
> (4)change resolution with 'g.region' res=500 (meter).
> 
> (5)create a point vector with 'r.to.v'(col=value) command.
> 
> I feel whether the target value is acquired by only change of resolution (90m-
>
> 500m). 
> 
> May I use 'r.surf.rst' ?
> 
> Best,
> Yasuo shimada: Japan weather associaton.
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> This mail was received via Mail-SeCure System.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] R.proj Problems Creating Table

2012-01-01 Thread Micha Silver

  
  
On 01/01/2012 15:43, Dave Kindem wrote:
Hello,
  
  
  I have created a vector layer from a database table in an XY
location (accidents_xy).  Both the topology and a database table
(accidents_xy) seem to have been created correctly.  When I try
to re-project the layer into a UTM location using r.proj, I
receive the following error:
  
  
  

  GRASS 6.4.1 (GRGHM_UTM):~ > v.proj input=accidents_xy
location=InterurbanTest output=accidents_utm
  DBMI-SQLite driver error:
  Cannot create table:
  create table sqlite.accidents_utm ( Name text, cat
integer, Longitude double precision, Latitude double
precision, Type text, Description text )
  unknown database sqlite

  


Probably you have to first create an empty sqlite database. Check
what your db parameters are with: "db.connect -p"
Then run "sqlite3 "
Where the path is from the above. Probably by default something
like: ~/grassdata/GRGHM_UTM//sqlite.db


  

  
  
  WARNING: Unable to create table

  WARNING: Unable to copy table

  WARNING: Failed to copy attribute table to output map
  Building topology for vector map ...
  Registering primitives...
  62 primitives registered
  62 vertices registered
  Building areas...
   100%
  0 areas built
  0 isles built
  Attaching islands...
  Attaching centroids...
   100%
  Number of nodes: 62
  Number of primitives: 62
  Number of points: 62
  Number of lines: 0
  Number of boundaries: 0
  Number of centroids: 0
  Number of areas: 0
  Number of isles: 0
  GRASS 6.4.1 (GRGHM_UTM):~ > 



The topology layer is created and displays (accidents_utm),
  but there is no database table.   I am running GRASS 6.4.1 and
  the Python GUI on a Mac, OS X 10.6.8.


Thanks for any suggestions about how to resolve the issue.


Dave



  Dave Kindem
  dkin...@gmail.com
  



  
  
  
  This mail was received via Mail-SeCure System.
  
  
  
  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

This mail was received via Mail-SeCure System.






  

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] R.proj Problems Creating Table

2012-01-01 Thread Dave Kindem
Hello,

I have created a vector layer from a database table in an XY location 
(accidents_xy).  Both the topology and a database table (accidents_xy) seem to 
have been created correctly.  When I try to re-project the layer into a UTM 
location using r.proj, I receive the following error:

> GRASS 6.4.1 (GRGHM_UTM):~ > v.proj input=accidents_xy location=InterurbanTest 
> output=accidents_utm
> DBMI-SQLite driver error:
> Cannot create table:
> create table sqlite.accidents_utm ( Name text, cat integer, Longitude double 
> precision, Latitude double precision, Type text, Description text )
> unknown database sqlite
> 
> WARNING: Unable to create table 
> WARNING: Unable to copy table 
> WARNING: Failed to copy attribute table to output map
> Building topology for vector map ...
> Registering primitives...
> 62 primitives registered
> 62 vertices registered
> Building areas...
>  100%
> 0 areas built
> 0 isles built
> Attaching islands...
> Attaching centroids...
>  100%
> Number of nodes: 62
> Number of primitives: 62
> Number of points: 62
> Number of lines: 0
> Number of boundaries: 0
> Number of centroids: 0
> Number of areas: 0
> Number of isles: 0
> GRASS 6.4.1 (GRGHM_UTM):~ > 

The topology layer is created and displays (accidents_utm), but there is no 
database table.   I am running GRASS 6.4.1 and the Python GUI on a Mac, OS X 
10.6.8.

Thanks for any suggestions about how to resolve the issue.

Dave

Dave Kindem
dkin...@gmail.com


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] How to create 500m DEM from 90m DEM

2012-01-01 Thread Micha Silver


  
  
On 01/01/2012 01:38 AM, sgw00...@nifty.com wrote:

  Dear grass users;

I would like to create 500m dem from 90m dem (SRTM).

So, I am going to write a script as follows...is it right ?




Here's how I would do:
1- Import the srtm, set resolution and region to this new raster:
g.region -p rast=

2- Get the current region extents:
v.in.region out=srtm_region
THis creates a vector rectangle of the current region

3- Now switch to the UTM location, and project the original vector
region to UTM...
v.proj in=srtm_region loc=
map= out=srtm_region
...and reset the current region to that new vector...
g.region -p vect=srtm_region
...but also reset the resolution to 500 m...
g.region -p res=500

4- Now you can run r.proj to reproject the original srtm to your UTM
region, and it will do the interpolation for you. The following
quote is from the r.proj man page:
"Note that, following normal GRASS conventions, the coverage and
resolution of the resulting grid is set  by  the  current region 
settings, which may be adjusted using g.region."
...so...
r.proj in= loc=
map= out=srtm_raster_utm method=bilinear
(You can choose which interpolation method to use, See the man page)

That should do it.
--
Micha



  (1)import with 'r.in.srtm' command.

(2)set resolution with 'g.region' command.
SRTM is 90m resolution...

(3)exchagen a projection from latlon_wgs84 to utm_xx with 'r.proj' command.
( because initial projection of SRTM data is latlon_wgs84...)

(4)change resolution with 'g.region' res=500 (meter).

(5)create a point vector with 'r.to.v'(col=value) command.

I feel whether the target value is acquired by only change of resolution (90m->
500m). 

May I use 'r.surf.rst' ?

Best,
Yasuo shimada: Japan weather associaton.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

This mail was received via Mail-SeCure System.






  

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user