Re: [GRASS-user] exporting raster map to kmz?

2014-07-25 Thread Sylvain Maillard
Hi,

kml is usually more used for vector data.
looking at the header img style=margin-right: 0px;
src=data:image/png;base64,iVBORw0KGgo, it seems that r.out.gdal is just
writing the binary code for your raster in an image tag in the kml file ...

Have you try to transform your raster into vector (
http://grass.osgeo.org/grass64/manuals/r.to.vect.html) and then to export
the vector to kml ?


Sylvain



2014-07-23 20:26 GMT+02:00 Vishal Mehta vishalm1...@gmail.com:

 Hi all,

 I'm trying to classify a LANDSAT8 image. In the process, i'd like to
 export an unsupervised classification i did (using i.cluster, followed by
 i.maxlik) raster (type:CELL) into kml/kmz, so that I could get some visual
 idea of the classification. the classification is from 1 to 10, with null
 data present.

 r.out.gdal -c input=lsat2014_unsupervised@PERMANENT
 output=C:\Users\Vishal\Documents\GIS\file3.kmz format=KMLSUPEROVERLAY
 type=Byte nodata=0

 but no matter what flags i try, i get a black box on google earth.


 I'm just using the GUI options, Grass7svn on Windows. FYI, I do know how
 to do this by modifying add-on r.out.kml in Linux, but it would be good if
 i could just do my entire workflow on one platform.

 Thanks!
 Vishal

 --
 Vishal K. Mehta, PhD
 Sr Scientist
 Stockholm Environment Institute - US
 133 D St Suite F
 Davis CA 95616
 www.sei-us.org

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

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

Re: [GRASS-user] grass-user Digest, Vol 99, Issue 17

2014-07-13 Thread Sylvain Maillard
Hi,

the best place to begin is the dedicated page on the wiki :
http://grasswiki.osgeo.org/wiki/GRASS_messages_translation

there are different options, you can either use a softwar on your computer
(I personnaly use poedit), or join the grass tranlation team on an online
tool like transifex (also used by other projects like Qgis).

Be aware that to fully translate grass is a long term project ! I will
recommand to begin with the grasswxpy file, it's the place where your
initial work will be the more visible (graphical interface) ;)

welcome on board !


cheers,
Sylvain


2014-07-11 14:40 GMT+02:00 Ratko Vasiljevic rv...@yahoo.co.uk:

 Dear collegues,

 my name is Ratko Vasiljević from Croatia, I use Grass GIS last two years,
 and I would like t start translate it to Croatian, but unfortunantely i
 can't approach to translate options, can anyone help me?

 Regards,

 Ratko

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

Re: [GRASS-user] Importing Mapinfo files with encoding cp1253'

2014-06-12 Thread Sylvain Maillard
Hi,

in the layer manager, menu Settings / then preferences, tab
attribute, there is a field to specify encoding for data = this does not
change the encoding of the data, but the encoding used to display it ...

Sylvain


2014-06-12 17:12 GMT+02:00 Nikos Alexandris n...@nikosalexandris.net:

 I got some Mapinfo vector data with Greek characters in both the attribute
 column names and the attribute row strings. Initially, both in GRASS and
 QGIS the characters appear messy. I verified, inside QGIS, that the
 encoding in question is cp1253 [0]. Passing this while importing the data
 in GRASS, like

 v.in.ogr dsn=Roads.TAB out=roads encoding=cp1253 --o

 does not work though (using ogrinfo --version, GDAL 1.10.1, released
 2013/08/26).  Is there a proper encoding instruction to pass to v.in.ogr,
 other than cp1253? I want to avoid solving this externally.

 Nikos

 [0] https://en.wikipedia.org/wiki/Windows-1253
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

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

Re: [GRASS-user] Processing NAIP images

2014-01-29 Thread Sylvain Maillard
Hi,

I think you can find a lot of tutorial/cours on the grass website (under
Documentation: http://grass.osgeo.org/documentation/tutorials/), on the
wiki (http://grasswiki.osgeo.org/wiki/Image_processing) and also on the
manual page (http://grass.osgeo.org/grass64/manuals/index.html). There are
usually link to the man page for every command, with everything explained ;)


for your job (identify roadways), I think you will mostly be interrested by:
- Combined radiometric/geometric (segmentation based) supervised
classification (i.gensigset, i.smap)
- i.segment (http://grass.osgeo.org/grass70/manuals/i.segment.html) working
in grass7 ...


Sylvain




2014-01-29 Pedro Camargo veigacama...@gmail.com

 Thanks, Jiao!!  This helps a lot!!!



 Pedro





 *From:* Jiao Wang [mailto:j...@hawaii.edu]
 *Sent:* Tuesday, January 28, 2014 1:02 PM
 *To:* Pedro Camargo
 *Cc:* GRASS user list
 *Subject:* Re: [GRASS-user] Processing NAIP images



 Hi Pedro,



 I did a test run and created an unsupervised classification image.



 Here are the steps I did:



 1 MrSID to tiff in QGIS

 2 import tiff in GRASS (i.in.gdal)

 3 create group and subgroup (i.group ---check Define also sub-group(same
 name as group)--- in the Layers in selected group keep one band file as
 described in i.cluster manual)

 4 classification --signature(i.cluster)

 5 classification--map (i.maxlik)



 Hope it helps.



 Best,

 Jiao





 On Tue, Jan 28, 2014 at 9:00 AM, Pedro Camargo veigacama...@gmail.com
 wrote:

 Hi,

I am trying to generate land use maps (looking to identify roadways
 only, actually) using NAIP imagery.

Since I am using the pre-compiled GRASS, I do not have MrSID inside
 GRASS, so converted the images to TIFF using QGIS.

   I believe I can use i.maxlik or something like that, but I do not
 know how to start.  It keeps asking for groups, but I do not know what is a
 group image.



 I googled a lot on this and looked into several tutorials, but still
 did not figure out how to start  this.  I have been educating myself
 through a few papers, but I guess I still need to find a good summarized
 tutorial on how to do this with multi band images such as NAIP.

 Does anybody have ideas to help?

 Thanks,

 Pedro


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



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

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

Re: [GRASS-user] Opening a shape file in GRASS 6.4.3

2013-08-14 Thread Sylvain Maillard
Hi,

Like Nikos, there is a problem with your file: a Geometry check report an
error about an Unclosed Ring ...


Sylvain


2013/8/13 Sonali Saha saha...@gmail.com

 I am new GRASS use, and learning GRASS to use  conservation literacy using
  rare plant databases. To start with I converted a Kml file of the state of
 Meghalaya India to a shapefile using DNRGarmin. However when I try to open
 the shapefile in GRASS I keep getting errors and the map of the opened file
 does not look anything like the original map. What did I do wrong. I am
 attaching the shapefile and dbf file, I used.

 thanks in advance

 Sonali
 This is the message I get in the command output console
 Projection of input dataset and current location appear to match
 Layer: Meghalay
 Counting polygons for 1 features...
 Importing map 1 features...
 -
 Building topology for vector map Megh_tmp...
 Registering primitives...
 1 primitives registered
 258 vertices registered
 Number of nodes: 2
 Number of primitives: 1
 Number of points: 0
 Number of lines: 0
 Number of boundaries: 1
 Number of centroids: 0
 Number of areas: -
 Number of isles: -
 -
 WARNING: Cleaning polygons, result is not guaranteed!
 -
 Snap boundaries (threshold = 1.000e-007):
 -
 Break polygons:
 -
 Remove duplicates:
 -
 Break boundaries:
 -
 Remove duplicates:
 -
 Clean boundaries at nodes:
 -
 Merge boundaries:
 -
 Change dangles to lines:
 -
 Remove bridges:
 -
 Building topology for vector map Megh_tmp...
 Building areas...
 2 areas built
 1 isles built
 Attaching islands...
 Number of nodes: 9
 Number of primitives: 12
 Number of points: 0
 Number of lines: 0
 Number of boundaries: 12
 Number of centroids: 0
 Number of areas: 2
 Number of isles: 1
 Number of areas without centroid: 2
 -
 Find centroids for layer: Meghalay
 -
 Write centroids:
 -
 1 input polygons
 Total area: 3.56766E+011 (2 areas)
 Overlapping area: 0 (0 areas)
 Area without category: 3.56766E+011 (2 areas)
 -
 Building topology for vector map Megh...
 Registering primitives...
 3 primitives registered
 17 vertices registered
 Building areas...
 2 areas built
 1 isles built
 Attaching islands...
 Attaching centroids...
 Number of nodes: 2
 Number of primitives: 3
 Number of points: 0
 Number of lines: 0
 Number of boundaries: 3
 Number of centroids: 0
 Number of areas: 2
 Number of isles: 1
 Number of areas without centroid: 2
 -
 WARNING: Errors were encountered during the import
 Try to import again, snapping with at least 1e-007: 'snap=1e-007'
 (Tue Aug 13 15:32:05 2013) Command finished (1 sec)

 --
 Sonali Saha, PhD.
 Senior Biologist
 The Institute for Regional Conservation
 22601 SW 152nd Avenue
 Miami FL 33170

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


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


Re: [GRASS-user] Any Gentoo/Funtoo grass-gis users?

2013-07-07 Thread Sylvain Maillard
Hi,

I'm a Gentoo user, and don't remember something specific about GRASS
installation ...

You can either use the standard install with latest stable ebuild (6.4.2),
or follow the standard compilation procedure (
http://grasswiki.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure
)
On my system, I installed both the official grass gentoo ebuild + 6.4.3_rc3
and 7 from svn. I put them in /opt/grass-xx

I join a small script I wrote to get an automated update. You just need to
install all dependencies, uncomment the first line for the first launch +
to make a new '/opt/grass7' directory ... it's basically just a collection
of commands for the standard compilation procedure and is not system
dependant ...


cheers,
Sylvain





2013/7/6 Nikos Alexandris n...@nikosalexandris.net

 Hi!

 I recently had the luck to be able to obtain a new system.  I am doing
 various
 trials (speak OSes) on it to make the switch from K-Ubuntu to something
 that
 will be more fun to work with.

 I've tried Scientific Linux 6 which I find nice, clean, but I dislike the
 old
 KDE (4.3). I can't live without KDE's Kontact goodies.  Also, myself being
 a
 specialist in messing up normal running systems, I managed to quickly mix
 up
 some of the repositories that don't go well along ;-p.  I didn't read the
 signs I guess...

 I am running currently on openSUSE 12.3 which offers a fantastic
 installation
 experience and appears to me to be very stable, even with latest KDE 4.10.
 Indeed, the experience was brought with the least of tweaking actions I
 needed
 to do so far, among various Linux distros I have tried (K-Ubuntu, Slax,
 Fedora
 once, Gentoo once, Debian some years ago).  I think, anyhow, that zypper
 (the
 cli package manager) isn't that good as apt-get (yes, apt-get has some
 functionalities which make life easy when hunting dependencies for example
 --
 me thinks at least).

 The third on the row is Funtoo.  I managed to install quickly the base
 following the official tutorial, had to fight a bit to install Xorg (since
 I
 didn't understand quite some stuff), wait hours for KDE to emerge.  Yet,
 it
 feels it's worth the time spent!  It seems that portage is quite an
 advanced
 tool and offers everything and even more (?) apt-get has to offer.  It'll
 take
 some time I guess till I gain a good understanding of the advantages and
 how
 to use'm properly.  But it feels like once set-up, you never look back.

 Herewith, I kindly ask you to share your experiences on-list.  In
 particular,
 are there Gentoo/Funtoo users out there who regularly build grass_trunk and
 the rest? GRASS-Wiki looks empty in this direction.

 Also, relates in a way, there is this
 http://wiki.osgeo.org/wiki/GIS_workstation_setup_tips page which
 deserves an
 update since Technology advances rapidly into new areas.

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



build_7.sh
Description: Bourne shell script
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Differences Between ERDAS and GRASS About NDVI Statistics

2013-01-13 Thread Sylvain Maillard
Hi,

a quick look at the stats files show some differences:
- Dimensions
- Layer Extent
- not the same range of data (from -2 to 2 in ERDAS ? oO)

so that's totally logical to get different mean and stdev ...

take care to use exactly the same extent/res when you are comparing 2 files
;)


cheers,
Sylvain



2013/1/14 Nikos Alexandris n...@nikosalexandris.net

 Gökçen Güner:

   This will not be a specific GRASS question. My friend and I tried to
   calculate NDVIs of same data set and results seem same to us.

 What kind of images are those, if I may ask? Which sensor?

   But checking statistics of each output we saw that statistics are very
   different. I mean, median, mean, std.dev values of Grass output and
 Erdas
   output are different.

   We couldn't find an explanation for this situation. What can be
   the reason for this?

  There are reasons. For example, different pixel inclusion rules (of
 course I
  have in mind border-near pixels). Other reasons might be the spatial
  resolution and extent (remember, GRASS-GIS is strict with that) and the
  presence of a MASK.

 Also,

 what about NULL or NoData cells? How does ERDAS deal with them -- I don't
 remember now. How are they defined, if they exist, in your image?

 What does r.describe -r return for the data set(s) in question?

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


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


Re: [GRASS-user] Parallel GRASS jobs .....

2012-11-28 Thread Sylvain Maillard
Hi,

for this approach, the best would be to
(before the multi-process job)
- put your map into the PERMANENT mapset

(for each process in parallel)
- make a new mapset for each process
- define the region of each mapset as a chunk of the whole region
- make your calculation

(once the process competed)
- put together all the results (eg, with r.patch)


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


Re: [GRASS-user] Parallel GRASS jobs .....

2012-11-28 Thread Sylvain Maillard
 I was trying to do that with g.region, but it only resized my map and
didn't cut it.
In fact it didn't modify your map, but resize the area where the
calculation is done byt hte other modules : with a small region defined in
a mapset, your code will work only on that part of the map in the PERMANENT
mapset.

as an example with a region of n=100 s=0 e=100 w=0, you can pass the region
limits to your script (eg: my_script.sh 50 0 50 0;  my_script.sh 100 50 50
0; ...) so the calculation are made only of a quarter of the whole region.
if your script can handle arguments, it will the first define its own
sub-region from what you passed to it: g.region n=$1 s=$2 e=$3 w=$4

Sylvain


2012/11/28 Daniel Lee l...@isi-solutions.org

 Hi there,

 I do this too and the standard methodology for me is to leave the
 resolution the same and change the region's borders. Take a look at the
 manual of g.region for guides on this, but let's say I've got the following:

 GRASS 6.4.3svn (EPSG4326_WGS84_ll):~  g.region -g
 n=63
 s=-63
 w=95
 e=180
 nsres=1.10020395685734e-05
 ewres=1.10020399076346e-05
 rows=11452422
 cols=7725840
 cells=88479579984480

 Then to reduce the region's size I'd do e.g.:
 g.region n=50 s=-50 w=100 e=110

 That would shrink my region down to the area that I'm interested in.

 HTH!
 Daniel



 2012/11/28 Andranik Hayrapetyan andranik@gmail.com

 I have been trying something like this some time ago, but I could not
 define region of a mapset as chunk of the whole region.
 Is g.region the right tool for this task?
 If it is not difficult for you, can you, please, explain the process of
  doing   *define the region of each mapset as a chunk of the whole
 region*  a bit more detailed.


 On Wed, Nov 28, 2012 at 1:56 PM, Sylvain Maillard 
 sylvain.maill...@gmail.com wrote:

 Hi,

 for this approach, the best would be to
 (before the multi-process job)
 - put your map into the PERMANENT mapset

 (for each process in parallel)
 - make a new mapset for each process
 - define the region of each mapset as a chunk of the whole region
 - make your calculation

 (once the process competed)
 - put together all the results (eg, with r.patch)


 Sylvain



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



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



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


Re: [GRASS-user] How I can download the eigensystem.exe and source code

2012-10-05 Thread Sylvain Maillard
Hi,

simply go the the grass website (http://grass.osgeo.org), menu Download,
then Other platform and source code, and you will get the link to
download full source code (
http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.4) or browse it (
http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/)

You will perhaps prefer the trac browser (
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4), it
is also possible to make search ... and you will find that the
m.eigensystem source code is available at :
http://trac.osgeo.org/grass/browser/grass-addons/grass6/misc/m.eigensystem


cheers,
Sylvain



2012/10/5 SWAPAN GHOSH swap.g...@gmail.com

 Dear all,

 Any one please supply me the source code for grass eigensystem.

 Thanks  Regards,

 Swapan Ghosh

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


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


Re: [GRASS-user] Importing ASCII file

2012-08-24 Thread Sylvain Maillard
Hi,

I think that the real problem is about the projection system

in your raster file:
xllcorner 459000.27618609
yllcorner 298999.76202791

and the error:
Illegal latitude for North

= grass just say that a latitue of 298999° is irrelevant ;)

so there are 2 possibilities:
1 - your raster file use a projection and you need to import it into a new
location with this projection
2 - the raster is really in decimal lat/lon, but *1 = xllcorner = 45.9
° and yllcorner = 29.89°

as your are using lidar data at a resolution of 0,5 it seems to me that the
unit used in your ratser coordinate is meters, so you need to know the
raster coordinate system before you can use it ;)

cheers,
Sylvain


2012/8/24 Alberto Pettazzi alberto.petta...@meteogalicia.es

  I think you should run r.in.ascii

 http://grass.osgeo.org/grass63/manuals/html63_user/r.in.ascii.html

 if you want to use r.sun you have to import the digital terrain model
 first. then you have to create a slope and an aspect rasters and then run
 r.sun with the r.slope.aspect command

 http://grass.osgeo.org/grass63/manuals/html63_user/r.slope.aspect.html

 and then finally running r.sun

 El 24/08/12 03:13, sotototo escribió:

 Hi,

 Im new to Grass GIS and I have the same problem.

 I have an ascii Lidar data set with XYZ values in the following format.

 ncols 1999
 nrows 1998
 xllcorner 459000.27618609
 yllcorner 298999.76202791
 cellsize  0.5
 NODATA_value  -
 - - - - - - - - - - - -
 - - - - - - - - - - - -
 - - - - - - - - - - -


 When I run r.in.arc I get the following error.

 Illegal yllcorner value in header: 298999.76202791
 Illegal latitude for North
 ERROR: Can't get cell header

 I tried r.in.xyz and I got this error.

 ERROR: Not enough data columns. Incorrect delimiter or column number? Found
 the following character(s) in row 1:
 [ncols 1999]

 I also tried the r3.in.ascii and i got this error.

 ERROR: readHeaderString: header value invalid


 ..

 So could you please tell me if i do something wrong?

 I actually want to use the r.sun algorithm to calculate solar radiation and
 if Im not mistaken the first step is to import first the ascii file to
 GRASS.


 Thank you





 --
 View this message in context: 
 http://osgeo-org.1560.n6.nabble.com/Importing-ASCII-file-tp4984276p4997492.html
 Sent from the Grass - Users mailing list archive at Nabble.com.
 ___
 grass-user mailing 
 listgrass-user@lists.osgeo.orghttp://lists.osgeo.org/mailman/listinfo/grass-user



 --

 Alberto Pettazzi


  MeteoGalicia - Departamento de Climatología y Observación

 Consellería de Medio Ambiente, Territorio e Infraestruturas

 Rúa de Roma, 6

 15707 Santiago de Compostela. A Coruña


  Teléfono: +34-881-999646


  e-mail: alberto.petta...@meteogalicia.es



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


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


Re: [GRASS-user] Raster with bounding box

2012-08-13 Thread Sylvain Maillard
Hi,

I would say you have at least 3 way to do that:
- use your bounding box points to make a vrt raster for each of your png
files
- use gdalwarp to georectify your png files
- manually write the POINTS files to use with i.rectify (try first to
georectify 1 file by hand with the georectify tool, and then go to the
group/subgroup directories to study the files structure)

for each of those solutions you will need to write a small script to
automate the process for all of your files ;)

cheers,
Sylvain



2012/8/13 Richard Chirgwin rchirg...@ozemail.com.au

 Hi all,

 I have a bunch of png format images to import. I also have a csv of the
 images' bounding boxes.

 Rather than working by hand, which would be slow - is there any quick way
 to turn the bounding boxes into a POINTS file for each image, to automate
 the georectification?

 Cheers,
 Richard
 __**_
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/grass-userhttp://lists.osgeo.org/mailman/listinfo/grass-user

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


Re: [GRASS-user] problem with grass 6.4.0

2012-07-12 Thread Sylvain Maillard
Hi,

I copy/paste your sample data in your email and what I see is the following
structure. I'm snot sure if it is the original structure or if it as been
modified byt various email software...

   -7.83043.050 0.000

- 3 white space
- your X data
- 4 white space
- your Y data
- 5 white space
- your Z data


 Reading data ...
 ERROR: Bad y-coordinate line 1 column 2. 

 the file I am trying to read from has the following structure

-7.83043.050 0.000
-6.93042.470 0.000
-8.53042.280 0.000
-7.64041.710 0.000
-7.79043.050 0.000
-6.90042.470 0.000

 and if I run the same r.in.xyz command in the old server I can import the
 file correctly.

 I don't know why grass 6.3.0 was able to read it and not grass 6.4.1, but
the error message seems to say that the script found only blanck columns ...

You can try to sanitize your file, ie not initial space and only 1 space
between each column, and tray again to import your file ;)
I already get some cases like that on tabulated ascii files from ArcGis
and always needed to sanitise them first !


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


Re: [GRASS-user] r.basin: Completes on Some Basins, Fails on Others

2012-06-07 Thread Sylvain Maillard
Hi,

I get a similar issue some time ago (but with a vector input) and wrote a
little script to work only with raster (no need to transform back to vector)

it's using r.distance (
http://grass.osgeo.org/grass64/manuals/html64_user/r.distance.html), wich
Locates the closest points between objects in two raster maps and output
an ascii line with the intersection point ...
you just need to input your 2 raster with basin boundaries and streams, and
it will do the job for all your objects at once ;)

Cheers,
Sylvain



2012/6/6 Rich Shepard rshep...@appl-ecosys.com

  Running r.basin using r.to.vect basin boundaries and r.to.vect
 r.stream.extract weighted streams (but same issue using unweighted
 streams).
 So far, of 7 sub-basins on which I've run the module only 4 complete
 successfully. The other three go through the entire process then fail with
 the error message that the outlet needs to be on a stream channel created
 by
 r.stream.extract.

  I use the same protocol on each sub-basin: zoom in very close to where the
 sub-basin boundary and stream channel cross, then note the x, y coordinates
 from the status line on the display window frame.

  What might account for this same process, using the same r.stream.extract
 map, to work on some sub-basins and fail on others?

 Rich

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


Re: [GRASS-user] 3D globe in NVIZ/GRASS

2012-05-02 Thread Sylvain Maillard
Hi,

I'm not sure if NVIZ can do that, but you can take a look at
http://www.osm-3d.org/home.de.htm, it could êrhaps be adapted to your data
... they did some videos, but I don't know how they did them ...
it's a project lead by a german university (
http://www.geog.uni-heidelberg.de/lehrstuehle/gis/), they may perhaps help
you ;)

cheers,
Sylvain



2012/5/2 Christian Ferreira chris.for.li...@googlemail.com

 Hi all,


 is possible to have in NVIZ a 3D globe (like Google Earth)? I must create
 some animations for 2 German TV channels, and I'm struggling to find a open
 source software that can do that (not just the animation, but also the
 rendering/recording which must be 1920p aka full HD).

 Any help is very much appreciated.

 Cheers,
 Christian

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


Re: [GRASS-user] I need to install Grass 6.1.0 in windows. Help!

2012-04-23 Thread Sylvain Maillard
Hi,

you better have to try your download from the official website:
http://grass.osgeo.org

I'm not sur you will really find binaries for the 6.1.0 release, this was a
development release, the only binaries were un bundle of qgis+grass on a
page that doesn't exist anymore (see
http://grass.osgeo.org/download/software_old.php#g610)

If you don't need this specific release, you better have to download the
latest available (http://grass.osgeo.org/download/software.php#g64x), there
is no more need of cygwin ;)


cheers,
Sylvain


2012/4/23 Vasco Nunes vascobnu...@gmail.com

 Hello!
 I need to install Grass 6.1.0 in windows.
 I tried the  http://grass.fbk.eu/download/software_old.php link for
 windows installation but i get: The page you were trying to access doesn't
 exist or has been removed.
 I also tried thru cygwin but no luck...
 Any ideas?


 --
 Vasco B. Nunes

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


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


Re: [GRASS-user] v.triangle -- module to produce TIN with breaklines using Triangle utility

2012-04-20 Thread Sylvain Maillard
Hi,

I'm not sure to understand the difference between your v.triangle and the
v.delaunay (
http://grass.osgeo.org/grass64/manuals/html64_user/v.delaunay.html) already
in grass core ... for what I see in your pdf exemple, it seems that your
new module is giving almost the same result as v.delaunay would do ...

can you explain the differences ? I like to learn new things in grass ;)


cheers,
Sylvain


2012/4/20 Alexander Muriy amu...@gmail.com

 Hi all.

 I wrote a shell-script module v.triangle that is front-end for the
 famous Triangle utility (http://www.cs.cmu.edu/~quake/triangle.html) of
 J.R. Shewchuk. I'm planning to add it to GRASS-Addons wiki page :)

 Triangle makes exact Delaunay triangulations, constrained Delaunay
 triangulations, conforming Delaunay triangulations and high-quality
 triangular meshes. On GIS terminology, it produces 2D TIN, optionally with
 breaklines.

 Link:  https://raw.github.com/amuriy/GRASS-scripts/master/v.triangle


 P.S. It generally works but centroids in final TIN have 0 heights. Now I
 think about some hack to make the right centroids in all areas of TIN.

 -
 Comparison of the one resulting TIN with the TIN produced in ArcView 3D
 Analyst see in linked PDF (
 http://dl.dropbox.com/u/42016908/ArcView_GRASS_TIN_breaklines.pdf)
 -


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


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


Re: [GRASS-user] How to find the second largest value in a series of rasters.

2011-12-09 Thread Sylvain Maillard
what about computing the first largest value, making your categorical map,
and using it as a mask ?

if you mask all cell containing the first largest value, then the second
largest value will become the first largest value of the masked raster
serie ...


my 2 ct

Sylvain



2011/12/10 Marcello Gorini gor...@gmail.com



 Marcello:


  My problem is that I also need to find the *second largest* value and
 the
  corresponding raster number which contains the second largest value.
 
  I am doing that by iterating over all classes through a shell script,
 but it
  obviously takes much more time than using a simple r.series command.
 
  Can anyone share any idea on how to accomplish that using r.series or
  something similar?


 Glynn:


 There isn't an efficient way to do this using existing tools. If you
 need the efficiency, I suggest adding a second largest aggregate to
 lib/stats (based upon c_max.c and c_maxx.c), and updating r.series to
 use it.


 Thanks for pointing me the way. I think it is a little beyond my skills,
 but I might give it a try.

 Cheers,
 Marcello.

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


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


Re: [GRASS-user] Re: How can i modify the algorithm/code for Hydrologic Modeling or watershed analysis?

2011-11-12 Thread Sylvain Maillard
you wrote on the [GRASS-user] list, which mean that most of the people here
are just users  ... you better have to send your message to the GRASS-dev
list ...

there is a special guide for programmers,
http://grass.osgeo.org/programming6/
and if you go on the download page (
http://grass.osgeo.org/download/software.php), you will easily find a way
to download the grass source code, which include r.watershed !

I don't know which changes do you plan to do, but if you'r not able to find
yourself the r.watershed files, then you need firt to read the manual !


Sylvain


2011/11/12 Sandip Maity sandip.stesa...@gmail.com

 Please give me the idea that how can i modify?

 On Fri, Nov 11, 2011 at 5:05 PM, Sandip Maity 
 sandip.stesa...@gmail.comwrote:

 Dear sir,

 I want to modify the existing code of watershed analysis.

 Please tell me in which file or folder i should go for changing the code?

 I have to change some or modify the form structure.

 Please help me.

 regards.

 Sandip.



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


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


Re: [GRASS-user] GRASS GIS development visualization from 1999 to 2011

2011-11-11 Thread Sylvain Maillard
Wonderful !

Sylvain



2011/11/11 Saber Razmjooei razmjoo...@faunalia.co.uk

 Excellent work...both the video and development!

 Cheers
 Saber


  Hi,
 
  I have created a video of the GRASS GIS development from 1999 to 2011:
 
  http://grass.osgeo.org/wiki/GRASS_development_visualization
 
  Enjoy
  Markus
 
  PS: It is on youtube, http://www.youtube.com/watch?v=suyDqmGXoWk
  The high-res version is also available in some minutes, see Wiki page.
  ___
  grass-user mailing list
  grass-user@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/grass-user
 


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

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


Re: [GRASS-user] Multiple installs of GRASS?

2011-10-13 Thread Sylvain Maillard
Hi,

in fact it's pretty easy to have multiple grass install on your computer:
you just need to follow the instructions on
http://grass.osgeo.org/wiki/Compile_and_Install#Ubuntu, and use the
--prefix=/opt/grass64 (or whatever you want)

on my gentoo box, i have a regular grass-6.4.1, and a compiled 6.4-svn,
grass-6.5, and grass-7 without any trouble!



cheers,
Sylvain


2011/10/13 Shane Litherland litherland-f...@bigpond.com

 Hi all,

 So, I know one can have a 'working' GRASS and a 'try-if-you-dare' GRASS
 on the one computer... a quick web search on how to do multiple grass
 installs gave me more info on laying turf than on computing though!

 The GRASS wiki has good info on compiling from source, but didn't see
 anything clear about how to set up a testing GRASS without it
 interfering with my existing, functional one.

 Any tips on where/what to read to get this right? am on ubuntu 10.04,
 working with GRASS 6.4.1, want to try the 6.4.2RC to check if a few
 glitches I am aware of have been sorted out.

 I probably read info about this months/years ago but need to update
 myself before I blunder on into compiling from source-code!

 Regards,
 Shane.

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

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


Re: [GRASS-user] link for download of grass 7.o source through cygwin

2011-08-11 Thread Sylvain Maillard
on http://grass.osgeo.org/download/software.php#g70x you can find link to
download grass7 source code, and also to download daily snapshot build for
windows ...


cheers,
Sylvain



2011/8/11 Sandip Maity sandip.stesa...@gmail.com

 Dear all,

 Please send me a link where i can get grass 7.0 source .

 thanks to all.

 Sandip

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


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


Re: [GRASS-user] Copying Raster Map from PERMANENT to Project Mapset

2011-07-29 Thread Sylvain Maillard
Hi,


g.copy will copy the whole map in the new mapset. If you want to get only
the portion of the DEM within the region of the new mapset, you will have to
use r.mapcalc !
be carafull to proprely set the resolution to that of your DEM, otherwise it
will be resampled and look quite bad ...


Sylvain




2011/7/27 Rich Shepard rshep...@appl-ecosys.com

  As you've read here the past couple of days, it took a bit for me to grok
 how to set the project mapset bounds as a subset of the PERMANENT mapset
 bounds and use g.copy on each map. They all display nicely in the monitor.

  However, when I use g.copy on the DEM, nothing displays in the monitor
 despite the entire 672M file being copied from PERMANENT.

  What I want is only that portion of the DEM within the smaller project
 bounds, and I want to be able to see it in the monitor so I can drape
 basins, project property, and streams on it. I'm not sure where I went
 wrong, so if you have some ideas on possible causes, please let me know.

 Rich
 __**_
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/**mailman/listinfo/grass-userhttp://lists.osgeo.org/mailman/listinfo/grass-user

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


Re: [GRASS-user] If not v.overlay, what?

2011-07-29 Thread Sylvain Maillard
2011/7/27 Rich Shepard rshep...@appl-ecosys.com

  I have a map of drainage basins and another of the project property
 boundary. Of the 4200+ basins in the map, the property is in only a dozen
 or
 so. I'm trying to overlay these maps to produce a union that has only those
 basins that drain the property. v.overlay with operator=or yields a
 combined
 map of _all_ basins and the property[1] so either I'm not correctly
 applying
 the module, or the resulting map needs more processing with a different
 module. Please point me in the right direction to get the results I want.


there are different ways for that job, one is using r.water.outlet which
compute the drainage area for a specified point: get to coordinates of the
outlet point of your drainage area, and it will compute one unique
corresponding catchment area !



   After I have a map containing only those basins overlaid by the property
 boundary I want to use v.overlay to clip the stream networks in these same
 basins. I assume that v.overlay with op=and will do this nicely. My
 question
 is then what process will allow me to extract each drainage basin with its
 stream network and portion of the property for terrain and hydrological
 analyses and modeling.


transform the resulting catchment area raster into an area vector
(r.to.vect), then use v.select or v.overlay to query the stream netwok that
is contains into the cathment area ...


[1] Using the wxPython GUI with v.overlay I did not see a data entry widget
 to select the operator. It apparently defaults to 'or' but if there's a
 radiobox to select 'or,' 'and,' 'not,' or 'xor' I did not see it.


in the command dialog box, there are several tabs. One is called Options,
and there is a list box Operator defines features written to output vector
map which permit to select the different avaliable operator ...



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


Re: [GRASS-user] help regarding r.cn, r.cn2, r.runoff module

2011-07-17 Thread Sylvain Maillard
just take a look at the Download old
versionhttp://grass.osgeo.org/download/software_old.php#historic
page, you will find almost every grass relese ;)


regards,
Sylvain


2011/7/17 akinchan akinchan.sing...@gmail.com

 Dear all

 i need the module mentioned in subject (r.cn, r.cn2, r.runoff module
 available upto GRASS GIS version 4.2) with source code. i have tried my
 best
 to search but only main page and very little information i have got each
 time. please help me and provide the source codeof these modules. i will e
 thankful for any help regarding this.

 akinchan
 akinchan.sing...@gmail.com

 --
 View this message in context:
 http://osgeo-org.1803224.n2.nabble.com/help-regarding-r-cn-r-cn2-r-runoff-module-tp6592175p6592175.html
 Sent from the Grass - Users mailing list archive at Nabble.com.
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

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


Re: [GRASS-user] assign heigght value to pixel(x,y)

2011-04-17 Thread Sylvain Maillard
Hi,

i'm not sure that the raster way is the easiest, the tools are not really
usable for what you want to do ...

you better have to make a new vector layer with a height attribute, then
display it over your raster and edit the vector layer by drawing
polygon/point with the height as attibute. Once ended, you will have to
convert the vector to raster (v.to.rast) using the attribute height as
raster value.
I think it's the easiest way as you will be able to store the same height
for many consecutive pixel without having to edit each one, and you will
also be able to easily change the height if your first try is not good
enought ;)



cheers,

Sylvain


2011/4/17 vinod kumar nani.kuni...@gmail.com

 Hi Markus Netler,

 i want to identify buildings, trees etc.. and assign height values at
 particular zoom level in a raster map and to view the data in a 3Dimensional
 where i do not have any information to identify pixel graphically.

 And the problem also persists in identifying buildings and assigning height
 values and to use condition like IF might not be possible as there is no
 source of information.

 Thanks in advance,
 nani.



 On Sat, Apr 16, 2011 at 11:06 PM, Markus Neteler nete...@osgeo.orgwrote:

 On Sat, Apr 16, 2011 at 10:36 PM, vinod kumar nani.kuni...@gmail.com
 wrote:
  Hi Markus Neteler,
 
  yes, importing pixel values with r.in ascii and patch into existing
 into
  raster is simple easy for particular pixel,
  but if we want to assign a height value to more pixels, for example
  assigning height value to buildings in a
  particular area in raster map is difficult as we don't no to which pixel
  value we have to assign height value and
  checking each pixel value is difficult.

 Now I understand a bit more: so use r.mapcalc with an if() condition.

 Markus



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


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


Re: [GRASS-user] Managing the Harmonized World Soil Database in GRASS

2011-03-25 Thread Sylvain Maillard
Hi,

some month ago I had to make some maps with the HWSD database. I used the
mdbtool (http://mdbtools.sourceforge.net/) to extract all tables from the
.mdb file to some sql files. Then I just imported all the table in a
postgres database, and it is quite easy to access them in GRASS ...


Regards,
Sylvain


2011/3/24 Luigi Ponti lpo...@inbox.com

 Dear listers,

 I seem to have successfully imported the Harmonized World Soil Database
 (HWSD) in BIL format to GRASS 6.4.svn via r.in.gdal. The data is available
 at

 http://www.iiasa.ac.at/Research/LUC/luc07/External-World-soil-database/HTML/index.html

 The HWSD is composed of a raster image file and a linked attribute database
 stored in Microsoft Access 2003 format. According to the documentation (page
 28)

 http://www.iiasa.ac.at/Research/LUC/External-World-soil-database/HWSD_Documentation.pdf

 using the HWSD database in a GIS should be straightforward. The MU_GLOBAL
 attribute column in the database is also stored in each raster cell, and may
 therefore be considered as the link to the raster.

 My goal would be to obtain more raster maps that show other (soil)
 attributes from the database or combination of different attributes based on
 computations. The documentation suggests the following work flow:

 - if necessary, realize the appropriate calculations (ex: after exporting
 from Access to Excel);
 - convert final attributes table to a compatible GIS format;
 - join the MU_GLOBAL attribute and the GRID value (dbf or txt formats);
 - convert the attribute to a new GRID (in the case it is needed).

 What comes to mind is value replacement using r.recode but maybe there is a
 better course of action.

 This is seemingly the best available soil GIS database with global
 coverage, so I thought my question may be useful to others.

 Kind regards and thanks in advance for any hint,

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

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


Re: [GRASS-user] Tutorial Not Same as GRASS 6.4

2011-03-01 Thread Sylvain Maillard
You just launch GRASS with the old Tcl/Tk interface
(http://grass.osgeo.org/grass64/manuals/html64_user/gis.m.html) and
the tutorial was made with the new wxGUI
(http://grass.osgeo.org/grass64/manuals/html64_user/wxGUI.html)

GRASS 6.4.0RC5+39438 is quite old, there are a lot of bug fixes and
improvements in the user interface, you will better have to download
the latest release from the website
(http://grass.osgeo.org/download/index.php). As the wxGUI is now the
default GUI, you will better understand what is written in the
tutorial ;)


cheers,
Sylvain



2011/3/1 Thomas D. Dean tomd...@speakeasy.org:
 I have GRASS 6.4.0RC5+39438 (2009).  I followed the tutorial, with lots
 of mental corrections and managed to get the example displayed.  The
 tutorial is good, just needs some tweeking to match the GRASS display.

 A quick introduction to the 6.4 wxGUI and raster maps,
 http://grass.osgeo.org/wiki/Quick_wx_tutorial,
 Does not correspond to the GRASS display.

 For example,

 Once inside add a raster map layer such as elevation from the
  PERMANENT mapset. To do this click on the checkerboard toolbar
 button with a + on it and then select the map name from the
 pull-down list which appears, and click [Ok].

 There is no icon checkerboard with a + on it.  Rather, there is a
 green, red, orange icon with an arrow in it.  However, it does have the
 description Add raster layer.  And, there is not a pull down list.
 Rather, a layer is added, labeled raster1 and clicking the i button
 brings up a pop-up that allows selecting the map.

 I am not good at describing things.  I don't know what the author
 intended the icons to be.

 How do I help feeding back the corrections?  Or, is this tutorial for a
 newer version?

 tomdean

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

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


Re: [GRASS-user] Raster import into GRASS via shell - unwanted spatially masked

2011-02-08 Thread Sylvain Maillard
Have you try to zoom on the extend of the imported raster ?

the r.in.* modules ignore grass region during the import, but after
your display use the mask and current region, so it can happend that
you have imported the full raster, but see only a small part ...


cheers,
Sylvain


2011/2/8  razmjoo...@faunalia.co.uk:
 Do you use r.in.gdal -e?
 Maybe you just need to change the color profile?
 Cheers
 Sab

 Hello,

 I have been writing a shell script to import lots of data into my GRASS
 project. Since a while when importing new data, the data is imported as if
 I had used one of my masks, although I have not set a mask.

 First idea was to remove the mask with r.mask -r
 Output from the shell:
 WARNING: No existing MASK to remove

 Has anybody an idea how to get the complete raster into GRASS?

 Thanks


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



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

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


Re: [GRASS-user] r.mapcalc -- 3 maps

2011-01-16 Thread Sylvain Maillard
 *r.patch* - Creates a composite raster map layer by using known category
values from one (or more) map layer(s) to fill in areas of no data in
another map layer. 

 The GRASS program *r.patch* allows the user to build a new raster map the
size and resolution of the current region by assigning known data values
from input raster maps to the cells in this region. This is done by filling
in no data cells, those that do not yet contain data, contain NULL data,
or, optionally contain 0 data, with the data from the first input map. Once
this is done the remaining holes are filled in by the next input map, and so
on. This program is useful for making a composite raster map layer from two
or more adjacent map layers, for filling in holes in a raster map layer's
data (e.g., in digital elevation data), or for updating an older map layer
with more recent data. The current geographic region definition and mask
settings are respected. 

http://grass.osgeo.org/grass64/manuals/html64_user/r.patch.html



2011/1/16 Gabriele N. gis...@libero.it


 Ciao grass users.

 I have three maps A, B, C.

 I would use r.mapcalc to combine them according to this logic:
 Put the values of A and if A is null you put the values of B and if B is
 null you put the values of C.

 I have tried in various ways without success. .. now I'm trying with a
 double IF...
 r.mapcalc output = if((isnull(a)),b,if(isnull(b)),c)  .but in this
 case I do not put the values of A


 Help / advice?

 Thanks
 --
 View this message in context:
 http://osgeo-org.1803224.n2.nabble.com/r-mapcalc-3-maps-tp5929440p5929440.html
 Sent from the Grass - Users mailing list archive at Nabble.com.
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

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


Re: [GRASS-user] Re: Calculating mode value for each polygon

2010-10-18 Thread Sylvain Maillard
hello,

something strange, i was quite sure to have send a response but it seems
something goes wrong ...

I wrote a little script that use r.mode:
- convert the vector with polygon to raster
- loop for each polygon
- get the mode and update the specified column in the vector file

it process only one polygon at a time and is quite slow, but do the job ;)

cheers,
Sylvain

[code]
#!/bin/bash

# vector with polygon
vect=Parcellaire
# name of the column to store the mode
col=new2000
# name of your data_map raster
cover=classif
# name for the tmp raster to compute the polygon
base=parcelles

g.region rast=${cover}
v.to.rast input=${vect} output=${base} use=cat

for cat in `r.stats ${base} | grep -v *`
do

cat_u=$(($cat - 1))
cat_o=$(($cat + 1))

g.copy rast=${base},${base}.${cat}
r.null map=${base}.${cat} setnull=0-${cat_u},${cat_o}-11000
g.copy rast=${base}.${cat},MASK
r.mapcalc ${cover}.${cat}=${cover}
r.mode base=${base}.${cat} cover=${cover}.${cat}
output=${base}.${cat}.reclass --o --v
class=$(echo `r.stats ${base}.${cat}.reclass | grep -v *`);
v.db.update map=${vect} column=${col} value=${class} where=cat=${cat}
g.remove rast=MASK,${base}.${cat}.reclass,${base}.${cat},${cover}.${cat}

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


Re: [GRASS-user] Re: which file do I use? .adf files

2010-09-17 Thread Sylvain Maillard
have you take a look in the metadata.xml file? regarding the name i guess
you could find usefull information inside ...


Sylvain


2010/9/17 Hermann Peifer pei...@gmx.eu

 I guess you want to run r.in.gdal, or something. So you could follow this
 advice:

  To open the coverage select the coverage directory,
  or an .adf file (such as hdr.adf) from within it.

 http://www.gdal.org/frmt_various.html#AIG

 Hermann


 On 17/09/2010 02:33, stephen sefick wrote:

 I know that I need to use a .adf file, but which one?  Is there a way
 to find out?  These are all in a file folder that is supposed to
 contain a 1_foot LIDAR dem.

 dblbnd.adf
 sta.adf
 w001001x.adf
 z001003.adf
 z001005x.adf
 hdr.adf
 vat.adf
 z001001.adf
 z001003x.adf
 hillshd_10m
 w001000.adf
 z001001x.adf
 z001004.adf
 metadata.xml
 w001000x.adf
 z001002.adf
 z001004x.adf
 prj.adf
 w001001.adf
 z001002x.adf
 z001005.adf


 thanks for all of your help,


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

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


Re: [GRASS-user] Script for r.proj and g.list issues

2010-09-13 Thread Sylvain Maillard
rasters in mapset 2000_02_february_trmm:
 -
 g.list type=rast mapset=2000_02_february_trmm
 --
 no raster files available in mapset 2000_02_february_trmm
 --
 (Mon Sep 13 12:23:11 2010) Command finished (0 sec)
 --


you made a mistake in the name of the mapset: you used
2000_02_february_trmm, try again without a  at the end ...


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


Re: [GRASS-user] cloud cover removal from LANDSAT data

2010-09-09 Thread Sylvain Maillard
 yes thanks, that looks great. The man page does not talk about it beyond
 a filename in the example, but does it need to be processed with
 i.landsat.toar before running i.landsat.acca? i.e. does it want derived
 temperatures instead of raw DNs? With DNs it exits with an error that it
 wants DCELL maps. (if temp, probably FCELL would be ok too, as the
 instrument is not that precise)


as mentionned in the description.html, i.landsat.acca work with reflectance
and temperature, so you have to use i.landsat.toar before i.landsat.acca

how do the i.landsat.acca, i.landsat.dehaze, and i.landsat.toar addon
 modules fit in/overlap with the i.atcorr module?


i.lansdat.dehaze make just a light athmospheric correction
i.attcorr do atmospheric correction using the 6S algorythm wich is much more
efficient, but need some extra parameters, and also work with several type
of capters
so you have to use i.landsat.dehaze OR i.attcorr

i.landsat.toar convert DN to radiance/reflectance and temparature
i.landsat.acca compute a cloud mask


also the acca man page does not really explain what benefit the 2-pass
 mode gives and what the -f flag does. ?


i think you can find all the explanations you can need about the way it's
working on the dedicated paper:
Irish R.R., Barker J.L., Goward S.N., and Arvidson T., 2006.
Characterization of the Landsat-7 ETM+ Automated Cloud-Cover Assessment
(ACCA) Algorithm. Photogrammetric Engineering and Remote Sensing vol.
72(10): 1179-1188
http://www.asprs.org/publications/pers/2006journal/october/2006_oct_1179-1188.pdf


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


Re: [GRASS-user] Best format for exporting raster data

2010-08-31 Thread Sylvain Maillard
Perhaps can you add an extra loop in your scripts for processing your data:
1 - extract the tarball
2 - import the raster in R
3 - and then delete the temporary uncompressed mapset.
it will take a little bit more space but just for one mapset at a time, and
I don't thing the process will be much slower than to access the files
directly into the compressed tarball ...

you can also buy more hard drive :D

if you make some benchmark test between different solution I will be
interreted in the results, I'm also working on a huge amound of raster data
within GRASS and R ...

regards,
Sylvain Maillard

Doctorant en Sciences de l'Environnement
Laboratoire Chimie Provence - UMR 6264 / Université de Provence
la Tour du Valat - Centre de recherche pour la conservation des zones
humides méditerranéennes
Le Sambuc
13200 Arles
France
tél:04.90.97.29.79
fax:04.90.97.20.19
www.tourduvalat.org



2010/8/31 Rainer M Krug r.m.k...@gmail.com

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 31/08/10 16:38, Markus Neteler wrote:
  On Tue, Aug 31, 2010 at 4:13 PM, Rainer M Krug r.m.k...@gmail.com
 wrote:
  ...
  I would leave it in GRASS and use the R-GRASS interface and/or the
  GDAL-GRASS plugin. See the Wiki for details.
 
  I am doing that already - but I don't think that works when I have the
  grass mapset compressed as a .tar.gz?
 
  I found archivemount which apparently lets you
  mount a possibly compressed tarball as a filesystem:
 
  http://en.wikipedia.org/wiki/Archivemount
  http://www.linux.com/archive/feature/132196

 Sounds interesting - I'll look into that.

 Thanks,

 Rainer

 
  Cheers
  Markus


 - --
 Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
 Biology, UCT), Dipl. Phys. (Germany)

 Centre of Excellence for Invasion Biology
 Natural Sciences Building
 Office Suite 2039
 Stellenbosch University
 Main Campus, Merriman Avenue
 Stellenbosch
 South Africa

 Tel:+33 - (0)9 53 10 27 44
 Cell:   +27 - (0)8 39 47 90 42
 Fax (SA):   +27 - (0)8 65 16 27 82
 Fax (D) :   +49 - (0)3 21 21 25 22 44
 Fax (FR):   +33 - (0)9 58 10 27 44
 email:  rai...@krugs.de

 Skype:  RMkrug
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.10 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

 iEYEARECAAYFAkx9Fo0ACgkQoYgNqgF2egot0gCaA4EJiyfYkRYjYXeJpKSBLaGT
 V5QAoITs1O5Npb81z0UvSYtY2tTtc7cy
 =rcm6
 -END PGP SIGNATURE-
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

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


[GRASS-user] strange behavior of i.cluster with sample=1,1

2009-09-24 Thread Sylvain Maillard
dear grass users,

i'm working on landsat imagery and i need to do some automatic
classification so i'm doing several tests with i.cluster (first, after that
i will also try i.cass or i.gensigset). As I wanted to see the impact of the
sample parameter, i launch a script with several variations and i noticed
this result: when the sample parameter is becoming smaller, i.cluster tend
to converge to only 1 class ...
I was thinking that with more samples the result will be more accurate but
it seems to be the oposit ... with the default value for sample, the result
is always correct ...

Is there something wrong with the fact to use sample=1,1 (or sample=10,10)
instead of the default value sample=56,71 ?
for the moment i'm working with landsat 5 or 7 imagery, so in the case of
land use with a very reduce location (ex: small rivers), having samples
only each 56x15m=840m can occult some land use category ...

I have the same error on  gras 6.3 or 6.4, grass did'nt notice any error,
and I have enought of ram (only 65% used) ... do you have an idea of what is
going wrong and what can i try to solve this problem?


I join the results of i.cluster with 20 classes and sample=1,1 parameter
set, the others have default values = it goes wrong imediately ... and with
default sample (56,71), everything works ...

Paramètres du cluster
  Nombre de classes initiales: 20
Taille minimum de classe :17
Séparation minimum entre classes: 0.00
Pourcentage de convergence:   98.00
  Nombre maximum d'itérations: 30

Intervalle d'échantillonnage en ligne: 1
Intervalle d'échantillonnage en colonne: 1

Taille de l'échantillon : 40439680 points

[ ...]

Distribution des classes
1826562  24892 450783 312030 852164
16461112323198278046830198913214292
34722393559417324673927395262249348
20136031977504175473112258981750284

 itération 1 ###
2 classes, 0.01% points stables
Distribution des classes
   38277534  0  0  0  0
  0  0  0  0  0
  02162146  0  0  0
  0  0  0  0  0

 itération 2 ###
1 classes, 5.35% points stables
Distribution des classes
  0  0  0  0  0
  0  0  0  0  0
  0   40439680  0  0  0
  0  0  0  0  0

 itération 3 ###
1 classes, 100.00% points stables
Distribution des classes
  0  0  0  0  0
  0  0  0  0  0
  0   40439680  0  0  0
  0  0  0  0  0



-- 
Sylvain Maillard
Doctorant en Sciences de l'Environnement

Laboratoire Chimie Provence - UMR 6264 / Université de Provence

la Tour du Valat - Centre de recherche pour la conservation des zones
humides méditerranéennes
Le Sambuc
13200 Arles
France
mail: maill...@tourduvalat.org




tél:04.90.97.29.79
fax:04.90.97.20.19
www.tourduvalat.org
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user