[GRASS-user] GeoPDF into GRASS?

2012-05-02 Thread Stephen Sefick

Is there a way to bring a GeoPDF into GRASS?
many thanks,

--
Stephen Sefick
**
Auburn University
Biological Sciences
331 Funchess Hall
Auburn, Alabama
36849
**
sas0...@auburn.edu
http://www.auburn.edu/~sas0025
**

Let's not spend our time and resources thinking about things that are so little 
or so large that all they really do for us is puff us up and make us feel like 
gods.  We are mammals, and have not exhausted the annoying little problems of 
being mammals.

-K. Mullis

"A big computer, a complex algorithm and a long time does not equal science."

  -Robert Gentleman


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


Re: [GRASS-user] Relationships of Raster & Vector Attribute Data

2012-05-02 Thread Rich Shepard

On Thu, 3 May 2012, Markus Neteler wrote:


It is in the cats/ subdirectory.


Markus,

  Interesting:

# 166 categories
Watershed basins

0.00 0.00 0.00 0.00
dem.basin lines 1-4/4 (END)


They are created if the raster maps has category labels (see
r.category).


  dem.basin: even numbers 2-166.


GRASS 6.4.3svn (nc_spm_08):~ > v.db.select myzipcodes


v.db.select basinv
cat|value|label
2|126|
3|126|
4|110|
5|2|
6|2|
7|96|
8|122|
9|20|
10|98|
11|126|
12|60|
13|130|
14|4|
15|58|
16|108|
17|14|
18|120|
19|124|
20|120|


Maybe too late here, I don't get the last question.


  Notice above from basinv: cats 2 and 3 have same value (but r.category
shows only even number cats for the raster version, dem.basin). Also cats 18
and 20 have the same value. That's what I mean by my third question: why
more categories in the vector produced in r.to.vect than in the raster
source, and why duplicate values for different categories?

Rich


Markus



--
Richard B. Shepard, Ph.D.  |   Integrity - Credibility - Innovation
Applied Ecosystem Services, Inc.   |Helping Ensure Our Clients' Futures
 Voice: 503-667-4517  Fax: 503-667-8863

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


Re: [GRASS-user] Relationships of Raster & Vector Attribute Data

2012-05-02 Thread Markus Neteler
On Wed, May 2, 2012 at 6:21 PM, Rich Shepard  wrote:
>  The basin map output from r.watershed is called 'dem.basin'. When I query
> a basin I see the easting and northing of the point where I clicked, and a
> numeric site_name variable. I've not checked all polygons, but I assume each
> is uniquely numbered.
>
>  First question: where in the mapset's directory structure is this
> site_name variable stored? I've looked in the subdirectories with a
> dem.basin file and do not see them.

It is in the cats/ subdirectory. See the second drawing in
http://grass.osgeo.org/programming6/
for the structure.

>  Converting this raster map to a vector using r.to.vect with an output name
> of 'basinv', creates a postgres table with three attribute columns: cat,
> value, and label. The latter is blank for all rows. The value column,
> however, has the same number repeated for different polygons.
>
>  Second question: how are these value numbers created?

They are created if the raster maps has category labels (see
r.category).

North Carolina example.

GRASS 6.4.3svn (nc_spm_08):~ > r.category zipcodes
27511   CARY
27513   CARY
27518   CARY
27529   GARNER
...
GRASS 6.4.3svn (nc_spm_08):~ > g.region rast=zipcodes -p
projection: 99 (Lambert Conformal Conic)
zone:   0
datum:  nad83
ellipsoid:  a=6378137 es=0.006694380022900787
north:  228500
south:  215000
west:   63
east:   645000
nsres:  10
ewres:  10
rows:   1350
cols:   1500
cells:  2025000

GRASS 6.4.3svn (nc_spm_08):~ > r.to.vect in=zipcodes out=myzipcodes feature=area
Extracting areas...

...
r.to.vect complete.

GRASS 6.4.3svn (nc_spm_08):~ > v.db.select myzipcodes
cat|value|label
1|27513|CARY
2|27607|RALEIGH
3|27608|RALEIGH
4|27604|RALEIGH
5|27603|RALEIGH
...

Works nicely.

>  Third question: why are there multiple values for different vector
> polygons where there are distinct site_name numeric values in the raster
> map?

Maybe too late here, I don't get the last question.

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


Re: [GRASS-user] Displaying site_name on r.watershed output basins map

2012-05-02 Thread Rich Shepard

On Wed, 2 May 2012, Margherita Di Leo wrote:


what does v.info map=basinv say?


Map scale:   1:1
Map format:  native
Name of creator: rshepard
Organization:
Source date: Wed May  2 10:42:33 2012

Type of Map:  vector (level: 2)
Number of points:   0   Number of areas:  378
Number of lines:0   Number of islands:1
Number of boundaries:   835 Number of faces:  0
Number of centroids:377 Number of kernels:0

Map is 3D:  No
Number of dblinks:  1

Projection: Transverse Mercator

N: 28704643.97591617S: 28589696.29729814
E:   628305.08857358W:   464582.93917488

Digitization threshold: 0

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 (Christian Ferreira)

2012-05-02 Thread Margherita Di Leo
Hi,

On Wed, May 2, 2012 at 5:06 PM,  wrote:

> Hello Christian,
>
>
> > 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.
> >
>
> One feasible option is to post-process GRASS raster output in POV-Ray to
> generate a globe. Rendering paramaters can be set according to your needs
> (fps, Full-HD etc).
>
> There was a workshop on this at the WGUG 2011 meeting (->
> http://www.wgug.org/index.php?option=com_content&view=article&id=46:scientific-workshop-2011-qspatial-analysis-with-grassq&catid=2:warsztaty&Itemid=5).
> The proceedings remain to be published, but there might be more info on the
> website.
>
> Here's an example from Tsunami domain on what can be done with the
> GRASS/POV-Ray combo:
>
>
> ftp://ftp.gfz-potsdam.de/home/dc/ploewe/TRIDEC/EyeCandy/TOHOKU2011/animation_fps20_merge4_fps25_diag_1600x1600.avi
> [22mb file!]
>

Another option is using GRASS & OSSIM through PlanetSasha:
http://web.me.com/epiesasha/PlanetSasha/Project.html

Regards,
madi



-- 
Ing. Margherita Di Leo, Ph.D.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: Re: [GRASS-user] help..

2012-05-02 Thread Markus Neteler
On Sat, Apr 28, 2012 at 11:40 PM, Albert Saribekyan
 wrote:
>> /usr/lib/libproj.so
>> /usr/lib64/libproj.so

This indicates that you have both the 32bit and 64bit version of PROJ4
installed. Not necessarily a problem but you need to check if the
right version is used.

>> Scientific Linux SL release 5.5 (Boron)

I am also using Scientific Linux, so that should be fine.

Note: you can get all including GRASS as RPMs from here
http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS
-> ELGIS repositories

This would bring also GRASS 6.4.2 to you.

Markus

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


[GRASS-user] Negative raster values from i.landsat.dehaze

2012-05-02 Thread James Travers


Hi,

I have been trying to get some results from GRASS for a couple of weeks now but 
am hitting a wall.  What I am trying to do is to take an area of land from a 
series of Landsat 7 ETM+ images and calculate NDVI over the area for the 
purpose of comparison over a time-period.  This obviously requires atmospheric 
correction, so the command sequence I am using after importing the images for a 
given mapset is:


# Generate radiance values
i.landsat.toar input_prefix="B" output_prefix="R" 
metfile="./L71174038_03820080324/L71174038_03820080324_MTL.txt" sensor="tm7"

# Atmospheric correction
i.tasscap -7 band1=R1 band2=R2 band3=R3 band4=R4 band5=R5 band7=R7 outprefix=TC
i.landsat.dehaze band1=R1 band2=R2 band3=R3 band4=R4 band5=R5 band7=R7 
tasscap4=TC.4 outprefix=D

# Generate NDVI map
r.mapcalc 'ndvi=if((D.3 == 0 && D.4 == 0), -1, (D.4 - D.3) / (D.4 + D.3))'


Then I mask the NDVI map with an area raster which I already created.  There is 
probably a better way of doing this.


# Mask NDVI map with individual regions
r.mapcalc 'area_ndvi = ndvi * area_mask@PERMANENT'


Finally I want an average value of the NDVI over the area.  There is definitely 
a better way of doing this but I couldn't find a grass command that spits out a 
single value.  Instead I used r.stats to give the area of each group of values 
and then wrote a Perl script to average these.


# Process statistics
r.stats -a --q area_ndvi | ./stats.pl


Ok, so here come the questions:

1) Is there a better way to simply get an average of all values over a given 
area to replace my stats.pl script?

2) and this is the big one.  When I perform i.landsat.dehaze I get rasters with 
primarily negative values.  This renders the NDVI calculation meaningless as 
they are ratios of +ve and -ve values.  I am presuming this is a mistake as 
negative reflectance has little meaning anyway - did I use the wrong sequence 
of commands?  Below are info outputs for the red-band after the TOAR and dehaze 
operations respectively:

Many thanks for any help on this,
Jamie

 ++
 | Layer:    R3 Date: Wed May  2 20:15:30 2012    |
 | Mapset:   L71174038_03820080324  Login of Creator: jamie   |
 | Location: area |
 | DataBase: /home/jamie/grassdata    |
 | Title: ( R3 )  |
 | Timestamp: none    |
 ||
 |    |
 |   Type of Map:  raster   Number of Categories: 255 |
 |   Data Type:    DCELL  |
 |   Rows: 6961   |
 |   Columns:  7911   |
 |   Total Cells:  55068471   |
 |    Projection: UTM (zone 36)   |
 |    N:    3619200    S:    3410370   Res:    30 |
 |    E: 843630    W: 606300   Res:    30 |
 |   Range of data:    min = -0.0129146013370688  max = 0.605436510681785 |
 |    |
 |   Data Description:    |
 |    generated by i.landsat.toar |
 |    |
 |   Comments:    |
 | Reflectance of Landsat-7 ETM+ (method uncorrected) |
 |        |
 | Acquisition date .. 2008-03-24 |
 | Production date ... 2012-02-23 |
 |    |
 | Earth-sun distance (d)  0.99699779 |
 | Digital number (DN) range . 1 to 255   |
 | Calibration constants (Lmin to Lmax) .. -5.000 to +234.400 |
 | DN to Radiance (gain and bias)  +0.94252 and -5.94252  |
 | Mean solar irradiance (ESUN) .. 1551.000   |
 | Reflectance = Radiance divided by . 387.15868  |
 |    -   |
 |    |
 |    i.landsat.toar input_prefix="B" output_prefix="R" metfile=".

Re: [GRASS-user] Displaying site_name on r.watershed output basins map

2012-05-02 Thread Margherita Di Leo
Rich,

On Wed, May 2, 2012 at 3:52 PM, Rich Shepard wrote:

> On Wed, 2 May 2012, Micha Silver wrote:
>
>  Have a look that you've enabled displaying of an attribute column. In the
>> GUI, it's on the "Required" tab as "Display selected attribute based on
>> attrcol". On the CLI "d.vect disp=shape,attr " This always trips me up
>> also. Should be a FAQ. And perhaps the "Display attribute..." should get
>> enabled somehow automatically whenever an attribute column for labeling is
>> chosen.
>>
>
> Micha,
>
>  I saw that before I wrote for help, but checking the attribute checkbox
> makes no difference. I cannot display either the cat numbers nor the
> raster map site_name which is the value column in the vector table.
>
>  When I uncheck all features but area the display clears. I have to try
> various options before the boundaries re-appear.
>
>  From the command line, writing to d.mon x0:
>
> GRASS 6.5.svn :~/grassdata > d.vect map=basinv disp=shape,attr type=area
> fcolor=none attrcol=value
>

what does v.info map=basinv say?

-- 
Ing. Margherita Di Leo, Ph.D.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Displaying site_name on r.watershed output basins map

2012-05-02 Thread Margherita Di Leo
On Wed, May 2, 2012 at 8:20 AM, Micha Silver  wrote:

>
> Have a look that you've enabled displaying of an attribute column. In the
> GUI, it's on the "Required" tab as "Display selected attribute based on
> attrcol". On the CLI "d.vect disp=shape,attr "
> This always trips me up also. Should be a FAQ. And perhaps the "Display
> attribute..." should get enabled somehow automatically whenever an
> attribute column for labeling is chosen.
>

+1


Ing. Margherita Di Leo, Ph.D.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Relationships of Raster & Vector Attribute Data

2012-05-02 Thread Rich Shepard

  The basin map output from r.watershed is called 'dem.basin'. When I query
a basin I see the easting and northing of the point where I clicked, and a
numeric site_name variable. I've not checked all polygons, but I assume each
is uniquely numbered.

  First question: where in the mapset's directory structure is this
site_name variable stored? I've looked in the subdirectories with a
dem.basin file and do not see them.

  Converting this raster map to a vector using r.to.vect with an output name
of 'basinv', creates a postgres table with three attribute columns: cat,
value, and label. The latter is blank for all rows. The value column,
however, has the same number repeated for different polygons.

  Second question: how are these value numbers created?

  Third question: why are there multiple values for different vector
polygons where there are distinct site_name numeric values in the raster
map?

TIA,

Rich


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


[GRASS-user] 3D globe in NVIZ/GRASS (Christian Ferreira)

2012-05-02 Thread peter . loewe
Hello Christian,


> 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.
>

One feasible option is to post-process GRASS raster output in POV-Ray to 
generate a globe. Rendering paramaters can be set according to your needs (fps, 
Full-HD etc).

There was a workshop on this at the WGUG 2011 meeting (-> 
http://www.wgug.org/index.php?option=com_content&view=article&id=46:scientific-workshop-2011-qspatial-analysis-with-grassq&catid=2:warsztaty&Itemid=5).
 The proceedings remain to be published, but there might be more info on the 
website.

Here's an example from Tsunami domain on what can be done with the 
GRASS/POV-Ray combo:

ftp://ftp.gfz-potsdam.de/home/dc/ploewe/TRIDEC/EyeCandy/TOHOKU2011/animation_fps20_merge4_fps25_diag_1600x1600.avi
[22mb file!]

hth,
Peter
 


-- 
Dr. Peter Löwe






Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Displaying site_name on r.watershed output basins map

2012-05-02 Thread Rich Shepard

On Wed, 2 May 2012, Micha Silver wrote:


Have a look that you've enabled displaying of an attribute column. In the
GUI, it's on the "Required" tab as "Display selected attribute based on
attrcol". On the CLI "d.vect disp=shape,attr " This always trips me up
also. Should be a FAQ. And perhaps the "Display attribute..." should get
enabled somehow automatically whenever an attribute column for labeling is
chosen.


Micha,

  I saw that before I wrote for help, but checking the attribute checkbox
makes no difference. I cannot display either the cat numbers nor the
raster map site_name which is the value column in the vector table.

  When I uncheck all features but area the display clears. I have to try
various options before the boundaries re-appear.

  From the command line, writing to d.mon x0:

GRASS 6.5.svn :~/grassdata > d.vect map=basinv disp=shape,attr type=area 
fcolor=none attrcol=value

produces the attached 'basinv.png'.

  A portion of the attribute table, generated by

GRASS 6.5.svn :~/grassdata > db.select sql="select * from basinv"

is,

cat|value|label
1|8|
3|114|
4|194|
5|190|
6|116|
7|184|
8|198|
9|120|
10|2|
11|192|
12|188|
13|6|
14|188|
15|172|
16|120|
17|4|
18|158|
19|192|
20|192|
21|192|
22|196|
23|118|
24|118|

  I'm not seeing what I've written incorrectly.

Thanks,

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


Re: [GRASS-user] extract single watershed from r.stream.order-result

2012-05-02 Thread Johannes Radinger
Hi again,

I found now a quite simple solution with the r.stream.basins module ...

> What I did so far:
> 
> r.watershed -f --overwrite elevation=elevation.10m@PERMANENT
> accumulation=accum 
> 
> r.mapcalc accum_abs=abs(accum)
> 
> r.stream.extract --overwrite elevation=elevation.10m@PERMANENT
> threshold=200 stream_rast=stream
>

#to extract the single river-network at the given outflow point I need
#also to extract the dirs:

r.stream.extract --overwrite elevation=elevation.10m@PERMANENT threshold=200 
stream_rast=stream direction=dirs

# and then run following:

r.stream.basins" dir=dirs coors=602140,4927950, basins = basins)

r.mapcalc sample_stream=basin&&stream



/Johannes
-- 
Ihr GMX Postfach immer dabei: die kostenlose GMX Mail App für Android.
Komfortabel, sicher und schnell: www.gmx.de/android
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] extract single watershed from r.stream.order-result

2012-05-02 Thread Johannes Radinger
Hi,

I followed the GRASS GIS commands J. Jasiewicz used
in his r.fuzzy paper to extract the streams as rasters
from the spearfish dataset.

What I did so far:

r.watershed -f --overwrite elevation=elevation.10m@PERMANENT accumulation=accum 

r.mapcalc accum_abs=abs(accum)

r.stream.extract --overwrite elevation=elevation.10m@PERMANENT threshold=200 
stream_rast=stream



Now I'd like to select only one of all drainage networks (watershed). I am 
interested in the right network of the two main river networks in spearfish
Is there an easy way to get only that main watershed into a new map? I thought 
about identifying it via the main outflow pourpoint at 602140|4927950...
Any suggestions?

Best regards,
Johannes


-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!  

Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a
___
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 

> 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


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

2012-05-02 Thread Christian Ferreira
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

-- 
Christian Ferreira
Oceanographer
Marum - Center for Marine Environmental Sciences
Bremen - Germany

Poseidon Linux team
http://www.poseidonlinux.org
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user