[GRASS-user] Raster Import

2010-06-11 Thread Kyaw Moe Aung
Dear List,
I am new user for Grass GIS. I have some questions regarding Jpg or tiff
import. When I use r.in.gdal which created 3 separate files as rgb. Then I
use r.patch to combine rgb. After that i.point and i.rectify. From this i
have to digitize river, stream, road, etc. So my question is as follow:
Can i remove unrectified former 3 seperate rgb files?
Is there any module to import without creating rgb because this increase the
memory usage? I have to import more than hundreds of scanned Jpg, tiff.
Can i crop the imported image without using other image software such as
gimp or photoshop, etc?
Thanks for any hint

-- 
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
U Kyaw Moe Aung, Staff Officer
Planning & Statistics Division, Forest Department, Director General's Office
Nay Pyi Taw, Ph:095-67-405016, Fax: 095-67-405016
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] polygons and centroids redux

2010-06-11 Thread Hamish
Dave wrote:
>     I think it would indeed be handy if a switch
> was added to v.what and
> d.what.vect in GRASS 7.  In the meantime it might be
> handy to write a v.pip command for GRASS 6.  I have
> written a point-in-polygon routine for other software
> (including R), but I would have to really study the file
> structures of GRASS vectors to attempt that in
> GRASS.   If any GRASS programmers are
> interested let me know and perhaps we could work it out as
> an add-on.

point in polygon is a standard function in the vector library for
years.


Hamish



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


Re: [GRASS-user] connecting to wms server

2010-06-11 Thread Hamish
Manuel:
> r.in.wms
mapserver=http://icvmapas.cetesi.gva.es/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
layers=mdt output=mdt

try mapserver=http://icvmapas.cetesi.gva.es/wms


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


Re: [GRASS-user] connecting to wms server

2010-06-11 Thread Manuel Seeger

Hi Hamish,
thanks for the first hint, now it loads the list of available data.
Nevertheless, it still does not import the requested data.
I use the wxPython frontend command, there I get:
r.in.wms 
mapserver=http://icvmapas.cetesi.gva.es/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities 
layers=mdt output=mdt

Calculating tiles...
Done: requesting 1 tiles
Downloading tiles...
Importing tile '0.geotiff'...
ERROR 4:
`/media/maxtor/GRASSDATA/wms_download/mdt/0.geotiff' not
recognised as a supported file format.
ERROR: gdalwarp failed
(Fri Jun 11 19:13:51 2010) Command finished (0 
sec)

when typing directly r.in.wms another frontend option opens, where I can 
choose the format. Coosing jpeg the following occurs:
r.in.wms -a output=mdt 
mapserver=http://icvmapas.cetesi.gva.es/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities 
layers=mdt srs=EPSG:23030 format=jpeg maxcols=1024 maxrows=1024 
method=bilinear

Calculating tiles...
ERROR: r.tileset failed

Hope you can find more little things, by now I am approximating!

Thanks a lot!

Manuel

Hamish schrieb:

please post full command line and region info..

try the -g GET method flag.



--- On Fri, 6/11/10, Manuel Seeger  wrote:

  

From: Manuel Seeger 
Subject: [GRASS-user] connecting to wms server
To: "GRASS user list" 
Date: Friday, June 11, 2010, 4:41 AM
Hi,
I am trying to connect to wms servers in Spain.
Unfortunately it does not work!
It delivers the following:
ERROR: Unable to get capabilities:   
   http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?REQUEST=GetCapabilities&SERVICE=WMS?service=WMS&request=GetCapabilities&version=1.1.1


I have the same problem with all the servers I try to
connect.
With QGIS it works fine...
I am using GRASS 7 on UBUNTU.

Any hint?

Manuel

--
__
Dr. Manuel Seeger
Dept. of Land Degradation and Development
Wageningen University & Researchcenter
Postal address:
P.O. Box 47, 6700 AA Wageningen, The Netherlands Visitors
address:
Atlas building, Droevendaalsesteeg 4, 6708 PB, room B415
phone:+ 31 317 486617
fax:+ 31 317 419000.
__


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





  



  


--
__
Dr. Manuel Seeger
Dept. of Land Degradation and Development
Wageningen University & Researchcenter
Postal address:
P.O. Box 47, 6700 AA Wageningen, The Netherlands 
Visitors address:
Atlas building, Droevendaalsesteeg 4, 6708 PB, room B415 
phone:	+ 31 317 486617
fax:	+ 31 317 419000. 
__


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


[GRASS-user] Creating a winGRASS distribution

2010-06-11 Thread Helmut Kudrnovsky
Hi Monica, 

>Any suggestions of doing a stand-alone installer of GRASS plus a few modules
of my own?

just have a look at

http://trac.osgeo.org/grass/wiki/CompileOnWindows

compiling and packaging a standalone wingrass-installer isn't so difficult.

best regards
Helmut
___
GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de


smime.p7s
Description: S/MIME Cryptographic Signature
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] polygons and centroids redux

2010-06-11 Thread Dave Roberts

Thanks Markus!

I think it would indeed be handy if a switch was added to v.what and
d.what.vect in GRASS 7.  In the meantime it might be handy to write a 
v.pip command for GRASS 6.  I have written a point-in-polygon routine 
for other software (including R), but I would have to really study the 
file structures of GRASS vectors to attempt that in GRASS.   If any 
GRASS programmers are interested let me know and perhaps we could work 
it out as an add-on.


Thanks, Dave R


Markus Metz wrote:

Dave Roberts wrote:

   It does raise a question, however, of what the conditions are that cause
d.what.vect to return a feature type of "Boundary" rather than "Area" when
querying a map.


d.what.vect and v.what search for points and centroids first. If none
is found, they continue and search for lines, boundaries and faces. If
none is found, they continue and search for areas. This search order
causes any centroid or boundary to be returned if found, and not the
corresponding area. Currently there is no way to select the feature
type (point, centroid, line, boundary, area, face) to be searched.
This option could be added for v.what in 7.0 if desired.

Markus M


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


Re: [GRASS-user] polygons and centroids redux

2010-06-11 Thread Markus Metz
Dave Roberts wrote:
>
>    It does raise a question, however, of what the conditions are that cause
> d.what.vect to return a feature type of "Boundary" rather than "Area" when
> querying a map.

d.what.vect and v.what search for points and centroids first. If none
is found, they continue and search for lines, boundaries and faces. If
none is found, they continue and search for areas. This search order
causes any centroid or boundary to be returned if found, and not the
corresponding area. Currently there is no way to select the feature
type (point, centroid, line, boundary, area, face) to be searched.
This option could be added for v.what in 7.0 if desired.

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


Re: [GRASS-user] polygons and centroids redux

2010-06-11 Thread Markus Metz
Dave Roberts wrote:
> Friends,
>
>     This is the second time in two days I have had to post an apology and
> retraction for hasty questions.  I apologize for testing everyone's
> patience.  Thanks Markus; I was composing this message when I saw your post.
>  I mistook a centroid of a polygon too small to plot at the current
> resolution as the centroid of the surrounding hollow area.  My mistake;
> sorry.

No sweat. Even though I am one of the maintainers of the vector
libraries, I wanted to be sure and looked up the actual behaviour in
the source code to make sure that a centroid is really only attached
to an area this centroid falls within.

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


[GRASS-user] polygons and centroids redux

2010-06-11 Thread Dave Roberts

Friends,

 This is the second time in two days I have had to post an apology 
and retraction for hasty questions.  I apologize for testing everyone's 
patience.  Thanks Markus; I was composing this message when I saw your 
post.  I mistook a centroid of a polygon too small to plot at the 
current resolution as the centroid of the surrounding hollow area.  My 
mistake; sorry.


It does raise a question, however, of what the conditions are that 
cause d.what.vect to return a feature type of "Boundary" rather than 
"Area" when querying a map.  Is it simply proximity to the boundary, and 
can that behavior be suppressed in preference to always returning the 
data associated with the centroid?


Thanks, Dave
--

David W. Roberts office 406-994-4548
Department of Ecology email drobe...@montana.edu
Montana State University
Bozeman, MT 59717-3460
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] polygons and centroids

2010-06-11 Thread Markus Metz
Dave Roberts wrote:
> Friends,
>
>   If I understand correctly (based on experience with my own data), when
> GRASS calculates the topology for vector area data it doesn't actually
> ensure that the centroid lies within the area it represents. If the area is
> a torus, or at least hollow in a general way, then the centroid might
> actually lie in the void in the center of the polygon rather than within the
> interior of the polygon itself.

No, grass does ensure that a centroid lies within an area when
building topology (attaching centroids). After building full topology,
the number of centroids outside any area is reported as
Number of centroids outside area:

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


[GRASS-user] polygons and centroids

2010-06-11 Thread Dave Roberts

Friends,

   If I understand correctly (based on experience with my own data), 
when GRASS calculates the topology for vector area data it doesn't 
actually ensure that the centroid lies within the area it represents. 
If the area is a torus, or at least hollow in a general way, then the 
centroid might actually lie in the void in the center of the polygon 
rather than within the interior of the polygon itself.  It seems like
it would be preferable to run a point-in-polygon check on the calculated 
centroid and move it of necessary to achieve correct point-in-polygon 
correspondence.


   This seems like it may also influence the results of v.what and 
d.what.vect as well, and not always identify the correct polygon if 
another centroid is nearer.  I assume this is a well-known situation, 
and that perhaps the solution for complex (sometimes hollow) polygons 
(following advice from Achim Kesseler)is to do a v.to.rast and sample 
the raster.   Is that considered best practice for complex area data, or 
are there better approaches?  Is v.what reliable in these situations, 
including in point-in-polygon mode?


Thanks, Dave
--

David W. Roberts office 406-994-4548
Department of Ecology email drobe...@montana.edu
Montana State University
Bozeman, MT 59717-3460
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Re: Customization of wxGUI

2010-06-11 Thread Pedro Roma
I'm doing some tests in order to customize my winGRASS installation and I
wanted to know if I can change anything else in GUI, besides the menu
(changing an xml file)? Like menu colors, function/script forms, display
windows, buttons? If so, how can I do that?

Thanks

Best regards
Pedro

On Tue, Jun 8, 2010 at 1:11 PM, Pedro Roma  wrote:

> Greetings
>
> I'm doing some tests in order to customize my winGRASS installation and I
> wanted to know if I can change anything else in GUI, besides the menu
> (changing an xml file)? Like menu colors, function/script forms, display
> windows, buttons? If so, how can I do that?
>
> Thanks
>
> Best regards
> Pedro
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Using addon: r.seg

2010-06-11 Thread katrin eggert
Greetings

Last week someone mentioned at this mailing list the r.seg segmentation from
here: http://www.ing.unitn.it/~grass/)
I have contacted the author but he didn't replied. Have anyone ever used? or
know someone that have used? :)

Please help me because I'm not able to run it

Thanks

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


Re: [GRASS-user] Grass to R and back again (randomForest classification)

2010-06-11 Thread Daniel Victoria
Thanks Nikos, it worked like a charm!
I'd also like to thaks Ned Horning for some greatlly aprecciated
off-list R help!

Cheers
Daniel

On Fri, Jun 11, 2010 at 9:39 AM, Nikos Alexandris
 wrote:
> Daniel Victoria:
>> I'm trying to do a randomForest classification in a MODIS NDVI time
>> series. So far I've been able to generate the randomForest and get the
>> Grass NDVI images inside grass as a SpatialGridDataFrame. Then,
>> following some notes from Markus Neteler [1], I converted the
>> SpatialGridDataFrame to a DataFrame and sucessfully applied the
>> randomForest classifier. The problem is that now I'm struglling to
>> transform the DataFrame back to a grass image. What is giving me a
>> headach is that the images contains lots of null values (I need to
>> have a MASK in place) so, each NDVI image has 1023701 cells but the
>> DataFrame has only 264647 values since the conversion from SpatialGrid
>> to DataFrame skips the nulls.
>
>> So, the question is, how to convert my DataFrame back to a Grass image?
>
> Daniel,
> so far I used the following steps:
>
> # import raster data in R using "readRAST6" of course
> x.raw <- readRAST6 (SomeRasterMap) # or readRAST6 (SomeRasterMap ,  NODATA =
> -99 )
>
> # use complete cases to deal with NA's
> x.nonas <- complete.cases ( x...@data )
>
> # get values
> x <- x@data[x.nonas,]
>
> # add new columns to "x.raw" that will be fed with... "newvalues"
> x@data$column1 <- NA
> x@data$column2 <- NA
> [etc.]
>
> # do something with your data or create new data.frame(s)
>
> # fill in the new (empty) columns of xraw
> x@data$column1[x.nonas] <- new.data.frame$newslot[,"newcolumn"]
> [etc.]
>
> # write back to grass
> writeRAST6(x.raw, zcol= NumberOfNewColumn, vname="SomeNameForTheRaster",
> overwrite=TRUE)
>
> Something like that... Hope it helps,
> Nikos
>
> ---
>> [1] http://mpa.fbk.eu/markus/shortcourse/notes7.html
>
> ---
>> PS - For completion sake...
>> Using Grass 6.4.0RC6 in Ubuntu 9.10
>> R 2.11
>>
>> commands used in R:
>>
>> # open images
>> ndvi <- readRAST6()
>>
>> # convert to dataframe
>> ndvi.df <- as.data.frame(ndvi)
>>
>> class <- predict(RFmodel, ndvi.df)
>>
>> # class contains 264647 classified pixels - how to get them back to an
>> image?
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Grass to R and back again (randomForest classification)

2010-06-11 Thread Nikos Alexandris
Daniel Victoria:
> I'm trying to do a randomForest classification in a MODIS NDVI time
> series. So far I've been able to generate the randomForest and get the
> Grass NDVI images inside grass as a SpatialGridDataFrame. Then,
> following some notes from Markus Neteler [1], I converted the
> SpatialGridDataFrame to a DataFrame and sucessfully applied the
> randomForest classifier. The problem is that now I'm struglling to
> transform the DataFrame back to a grass image. What is giving me a
> headach is that the images contains lots of null values (I need to
> have a MASK in place) so, each NDVI image has 1023701 cells but the
> DataFrame has only 264647 values since the conversion from SpatialGrid
> to DataFrame skips the nulls.

> So, the question is, how to convert my DataFrame back to a Grass image?

Daniel,
so far I used the following steps:

# import raster data in R using "readRAST6" of course
x.raw <- readRAST6 (SomeRasterMap) # or readRAST6 (SomeRasterMap ,  NODATA = 
-99 )

# use complete cases to deal with NA's
x.nonas <- complete.cases ( x...@data )

# get values
x <- x@data[x.nonas,]

# add new columns to "x.raw" that will be fed with... "newvalues"
x@data$column1 <- NA
x@data$column2 <- NA
[etc.]

# do something with your data or create new data.frame(s)

# fill in the new (empty) columns of xraw
x@data$column1[x.nonas] <- new.data.frame$newslot[,"newcolumn"]
[etc.]

# write back to grass
writeRAST6(x.raw, zcol= NumberOfNewColumn, vname="SomeNameForTheRaster", 
overwrite=TRUE)

Something like that... Hope it helps,
Nikos

---
> [1] http://mpa.fbk.eu/markus/shortcourse/notes7.html

--- 
> PS - For completion sake...
> Using Grass 6.4.0RC6 in Ubuntu 9.10
> R 2.11
> 
> commands used in R:
> 
> # open images
> ndvi <- readRAST6()
> 
> # convert to dataframe
> ndvi.df <- as.data.frame(ndvi)
> 
> class <- predict(RFmodel, ndvi.df)
> 
> # class contains 264647 classified pixels - how to get them back to an
> image?
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Grass to R and back again (randomForest classification)

2010-06-11 Thread Daniel Victoria
Hi list,

I'm trying to do a randomForest classification in a MODIS NDVI time
series. So far I've been able to generate the randomForest and get the
Grass NDVI images inside grass as a SpatialGridDataFrame. Then,
following some notes from Markus Neteler [1], I converted the
SpatialGridDataFrame to a DataFrame and sucessfully applied the
randomForest classifier. The problem is that now I'm struglling to
transform the DataFrame back to a grass image. What is giving me a
headach is that the images contains lots of null values (I need to
have a MASK in place) so, each NDVI image has 1023701 cells but the
DataFrame has only 264647 values since the conversion from SpatialGrid
to DataFrame skips the nulls.

So, the question is, how to convert my DataFrame back to a Grass image?

Cheers
Daniel

[1] http://mpa.fbk.eu/markus/shortcourse/notes7.html

PS - For completion sake...
Using Grass 6.4.0RC6 in Ubuntu 9.10
R 2.11

commands used in R:

# open images
ndvi <- readRAST6()

# convert to dataframe
ndvi.df <- as.data.frame(ndvi)

class <- predict(RFmodel, ndvi.df)

# class contains 264647 classified pixels - how to get them back to an image?
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] connecting to wms server

2010-06-11 Thread Manuel Seeger

Hi,
I am trying to connect to wms servers in Spain. Unfortunately it does 
not work!

It delivers the following:
ERROR: Unable to get capabilities:   
http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx?REQUEST=GetCapabilities&SERVICE=WMS?service=WMS&request=GetCapabilities&version=1.1.1


I have the same problem with all the servers I try to connect.
With QGIS it works fine...
I am using GRASS 7 on UBUNTU.

Any hint?

Manuel

--
__
Dr. Manuel Seeger
Dept. of Land Degradation and Development
Wageningen University & Researchcenter
Postal address:
P.O. Box 47, 6700 AA Wageningen, The Netherlands 
Visitors address:
Atlas building, Droevendaalsesteeg 4, 6708 PB, room B415 
phone:	+ 31 317 486617
fax:	+ 31 317 419000. 
__



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


[GRASS-user] Re: Import GRIB files to GRASS

2010-06-11 Thread António Rocha

Hi all

Well, since I'm only evaluating (for now) how to import GRIB's into 
GRASS, I wanted to test the r.region solution.

Can anyone describe me what to do regarding that suggestion?

Hamish, about the patch, I'm using GDAL1.7 so I cannot apply your patch. 
I'm going to reply on this in GDAL bug tracker.


Thanks


It is so interesting to see vastly different approaches to solve a
similar problem.  I'm downloading NOAA forecast data which is in GRIB
format.  I run the files through degrib and then parse the shape files with
a C program using the shapelib libraries and create a new shape file which I
import into GRASS with v.in.ogr.  I plot the values with d.vect.thematic.

The resulting maps can be viewed at:
http://www.ars.usda.gov/npa/marc/heatstress

That reminds me, I originally set up a location for each region with an
eye forward on multithreading the map generation phases.  I forgot the
reason in the middle of the project and created several regions in one
location.  I had to revert back to a location for each region when I
implemented multithreading but reduced the total map generation time from
several hours to 15 minutes.   :-) 



Randy
  




__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5189 (20100611) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


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


[GRASS-user] Creating a winGRASS distribution

2010-06-11 Thread Monica Buescu
Greetings

My name is Monica and I'm a grad students of Environmental Systems analysis.
To a final project I have been developing all my work on GRASS (6.4.0)
(Linux) which includes not only using GRASS' modules but adding a few ones
(simples). My idea was, at the end of the project, give an Linux Installer
of GRASS with all my added modules and edited Menubars.
But, yesterday I realized that "Linux is no good" for my department so I
need to do exacly this but with winGRASS. I gave a look around and:
- imposible doing with winGRASS binary since it does not support to add more
files than the ones already included
- OSGEO4W not possible because it's installing a GRASS version available at
OSGEO server. I would have to "substitute" that version :)
-
Any suggestions of doing a stand-alone installer of GRASS plus a few modules
of my own?

Thanks congrats for the excellent free-open-source software
Monica
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user