Re: [GRASS-user] Random Forest Classifier

2011-10-27 Thread Etienne DELAY
Le 26/10/11 10:30, Mohammed Rashad a écrit :
 Hi All,
 I am searching for an example of image classification using Random Forest
 classifier. I found R has a package for random forest classification.
 
 Anyone has done this classification using R and GRASS?
 
 please provide an example and tell me some sample data
 
 
 
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user
Hi Mohammed
I have find that this moring, may be it can be interesante for you.
It's note an exemple for Grass R utilisation but...

http://www.r-bloggers.com/mixed-effects-models-in-r-with-quantum-forest/?utm_source=feedburnerutm_medium=feedutm_campaign=Feed%3A+RBloggers+%28R+bloggers%29utm_content=Google+Reader

-- 
Cordialement

Etienne DELAY(IDSkype : etienne.delay.tic)
PhD student on evolution of vineyard landscape
laboratoire GEOLAB UMR 6042 CNRS
Université de Limoges, FLSH
39E rue Camille Guérin 87036 Limoges
CV en ligne : http://www.viadeo.com/invitation/etienne.delay
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] set up Grass 7 to run using eclipse or Ubuntu?

2011-10-27 Thread Matthew Mulbrandon

Hello,

Just wondering if anyone has an example of how to set up python environment 
variables for grass 7 in Ubuntu. I am assuming it is different form Grass 6.5. 
I am particularity interested if people are running Grass 7 from eclipse. 

Thanks,

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


[GRASS-user] OSM import via gpsbabel fails

2011-10-27 Thread Richard Chirgwin

Hi,

Trying to import the Australian Open Street Map file using v.in.garmin 
with format=osm, I get this error:



gpsbabel(8336) malloc: *** mmap(size=2097152) failed (error code=12)
.tmp/Richard.local/8320.0.xcsv: No such file or directory
/v.in.gpsbabel: line 257: [: : integer expression expected
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
gpsbabel: Unable to allocate 148 units of 1 bytes of memory.

System:
Mac OSX 10.5.8
Grass-GIS 6.4

The OSM file is here, but warning, it's large:
http://www.osmaustralia.org/osmausextract.php

Any suggestions?

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


[GRASS-user] ps.map arrow head

2011-10-27 Thread Vincent Bain
Hi list,
a bit of squeezed with ps.map : is there a simple way to draw arrowheads
on top of vector lines in a map composition ?
I did not find any option in vlines instruction. Did I miss it ?

Perhaps should I extract tnodes (or fnodes) from the source lines
vector, then print arrowheads as symbols with vpoints instruction. But I
can't figure out how I can obtain the angle to rotate symbols the right
way, ie finding the azimuth of the last (or first) segment of each
line...

If anyone experienced this, I would be glad to know how you proceeded.

Thank you,
Vincent

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


Re: [GRASS-user] Joining two polygons

2011-10-27 Thread Daniel Victoria
v.dissolve ?

http://grass.osgeo.org/gdp/html_grass64/v.dissolve.html

Cheers
Daniel

On Mon, Oct 24, 2011 at 11:46 AM, Luisa Peña luisapena1...@gmail.com wrote:
 Greetings
 I have imported a Shapefile with a few polygons (areas) and I want to join
 two of them. These two have different Sq Meters, Hectares, Acres, Sq miles,
 same layer (Layer: 1); different category (5 and 7), same Driver, same
 database, same table, different cat, same key column, same Id, and other
 fields are different. How can I join them in a single area?
 Thanks
 Luisa

 ___
 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] create a new vector map and add attributes

2011-10-27 Thread Mohammed Rashad
How to create a new vector map by code and define its attribute table?
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] create a new vector map and add attributes

2011-10-27 Thread Sören Gebbert
http://trac.osgeo.org/grass/browser/grass/trunk/vector/v.random/main.c

2011/10/27 Mohammed Rashad mohammedrasha...@gmail.com:
 How to create a new vector map by code and define its attribute table?


 ___
 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] create a new vector map and add attributes

2011-10-27 Thread Martin Landa
Hi,

2011/10/27 Mohammed Rashad mohammedrasha...@gmail.com:
 How to create a new vector map by code and define its attribute table?

v.edit map=new tool=create
v.db.addtable map=new columns=cat int, label varchar(250)

Martin

PS: in GRASS 7 omit cat int,

-- 
Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] create a new vector map and add attributes

2011-10-27 Thread Martin Landa
2011/10/27 Martin Landa landa.mar...@gmail.com:
 Hi,

 2011/10/27 Mohammed Rashad mohammedrasha...@gmail.com:
 How to create a new vector map by code and define its attribute table?

 v.edit map=new tool=create
 v.db.addtable map=new columns=cat int, label varchar(250)

I see by code, so take a look at v.edit module (TOOL_CREATE).

Martin

-- 
Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] wxpyhton icon theme problem

2011-10-27 Thread Lluís Vicens
Maybe is a silly question but,

How could I change the icon theme on GRASS6.4.2RC1 from the terminal, or
which document(s) should edit to do that? The problem is that once I
compiled 6.4.2RC1 I've tried to change the icon theme and when I
restarted the g.gui, an error appears and I cannot longer load the
wxpython GUI, so I'm not able to access the Preferences menú :\

What's wrong?

PS: GRASS 6.4.2RC1 compiled from sources on Ubuntu 10.10 

Error message:

Traceback (most recent call last):
  File /usr/local/grass-6.4.2RC1/etc/wxpython/wxgui.py, line 65, in
module
from gui_modules import layertree
  File
/usr/local/grass-6.4.2RC1/etc/wxpython/gui_modules/layertree.py, line
44, in module
import toolbars
  File /usr/local/grass-6.4.2RC1/etc/wxpython/gui_modules/toolbars.py,
line 51, in module
from icon import Icons
  File /usr/local/grass-6.4.2RC1/etc/wxpython/icons/icon.py, line 433,
in module
'scriptSave' : MetaIcon(img = iconSet['script-save'],
KeyError: 'script-save'



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


Re: [GRASS-user] wxpyhton icon theme problem

2011-10-27 Thread Martin Landa
Hi,

2011/10/27 Lluís Vicens ll...@sigte.udg.es:
 How could I change the icon theme on GRASS6.4.2RC1 from the terminal, or
 which document(s) should edit to do that? The problem is that once I
 compiled 6.4.2RC1 I've tried to change the icon theme and when I restarted
 the g.gui, an error appears and I cannot longer load the wxpython GUI, so
 I'm not able to access the Preferences menú :\

Change

cat ~/.grass6/wx | grep icon

to

appearance;iconTheme;type;grass2


   File /usr/local/grass-6.4.2RC1/etc/wxpython/icons/icon.py, line 433, in
 module
     'scriptSave' : MetaIcon(img = iconSet['script-save'],
 KeyError: 'script-save'

It's a bug, fixed in r48963.

Martin

-- 
Martin Landa landa.martin gmail.com * http://geo.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] wxpyhton icon theme problem

2011-10-27 Thread Lluís Vicens
El dj 27 de 10 de 2011 a les 13:51 +0200, en/na Martin Landa va
escriure:

 Hi,
 
 2011/10/27 Lluís Vicens ll...@sigte.udg.es:
  How could I change the icon theme on GRASS6.4.2RC1 from the terminal, or
  which document(s) should edit to do that? The problem is that once I
  compiled 6.4.2RC1 I've tried to change the icon theme and when I restarted
  the g.gui, an error appears and I cannot longer load the wxpython GUI, so
  I'm not able to access the Preferences menú :\
 
 Change
 
 cat ~/.grass6/wx | grep icon
 
 to
 
 appearance;iconTheme;type;grass2
 
 
File /usr/local/grass-6.4.2RC1/etc/wxpython/icons/icon.py, line 433, in
  module
  'scriptSave' : MetaIcon(img = iconSet['script-save'],
  KeyError: 'script-save'
 
 It's a bug, fixed in r48963.
 
 Martin
 


Done! So many thanks Martin ;)

Lluís
attachment: face-wink.png___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] grass link libraries

2011-10-27 Thread Mohammed Rashad
how to solve this error?
which libraries to be linked
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x34): error:
undefined reference to 'G__gisinit(char const*, char const*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x61): error:
undefined reference to 'Vect_open_new(Map_info*, char const*, int)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x88): error:
undefined reference to 'Vect_default_field_info(Map_info*, int, char const*,
int)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0xac): error:
undefined reference to 'Vect_subst_var(char const*, Map_info*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0xc4): error:
undefined reference to 'db_start_driver_open_database(char const*, char
const*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0xda): error:
undefined reference to 'db_begin_transaction(_db_driver*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0xe9): error:
undefined reference to 'db_init_string(_db_string*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x138): error:
undefined reference to 'db_set_string(_db_string*, char const*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x189): error:
undefined reference to 'Vect_map_add_dblink(Map_info*, int, char const*,
char const*, char const*, char const*, char const*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x198): error:
undefined reference to 'db_get_string(_db_string*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x1a8): error:
undefined reference to 'G_debug(int, char const*, ...)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x1c2): error:
undefined reference to 'db_execute_immediate(_db_driver*, _db_string*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x1da): error:
undefined reference to 'db_close_database(_db_driver*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x1e9): error:
undefined reference to 'db_shutdown_driver(_db_driver*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x1fb): error:
undefined reference to 'Vect_delete(char const*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x20a): error:
undefined reference to 'Vect_hist_command(Map_info*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x216): error:
undefined reference to 'G_get_window(Cell_head*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x225): error:
undefined reference to 'Vect_build(Map_info*)'
/usr/bin/ld: /tmp/ccfh4ykU.o: in function main:main.cpp(.text+0x234): error:
undefined reference to 'Vect_close(Map_info*)'
collect2: ld returned 1 exit status


-- 
Regards,
   Mohammed Rashad K M
   M.S. (By Research) student
   Lab for Spatial Informatics
   Department of CSE
   International Institute of Information Technology
   Hyderabad, India
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Define statistical bins in GRASS

2011-10-27 Thread António Rocha

Greetings
I have a raster image that I want to analyze its frequency inside 
defined bins. How can I define bins size and bins-limits in GRASS?

THanks
Antonio



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 6578 (20111027) __

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


Re: [GRASS-user] Is it possible to export a Raster to KML

2011-10-27 Thread katrin eggert
Hi
Thanks for all the feedbacks
I have used it and It's ok but
THe results are not much different if I use my data in WGS84UTM and
reprojecting to EPSG:4326. Just a slightly difference. Is this expectable
such a slightyly difference? (I'm not an expert in Geo Reference Systems)
Thanks

2011/10/26 Markus Metz markus.metz.gisw...@googlemail.com

 katrin eggert wrote:
  Hi
  Maybe it would be better to explain that in manual entry. Just one more
  question: what is the EPSG code for that projection?

 http://www.google.com/search?q=google+kml+epsg
 - 4326

  Thanks
  Kat
 
  2011/10/26 Markus Neteler nete...@osgeo.org
 
  On Tue, Oct 25, 2011 at 6:32 PM, katrin eggert
  katrineggert1...@gmail.com wrote:
   Hello Daniel
   By reading the r.out.kml manual I have a few questions:
   1- KML expects data to be in Latitude-Longitude using the WGS84 datum
   and
   EGM96 vertical datum. .
 
  (see also
 
 
 http://en.wikipedia.org/wiki/Keyhole_Markup_Language#Geodetic_reference_systems_in_KML
  )
 
   My data is in WGS84 UTM 26N. Does this mean that I
   have to create a new location with this information
 
  Yes. you have to reproject the maps.
 
  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


[GRASS-user] using a vector map as target map for raster map to georectify

2011-10-27 Thread Moritz Lennert

Hello,

Trying to use the georeferencing tool in 6.4.1, I have the following 
question: is it possible to define a vector map as target map when 
georeferencing a raster map ? I can't seem to find how to do this.


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


[GRASS-user] mapset not found: problem with file permissions?

2011-10-27 Thread Damian M
I am having a difficult time accessing a workspace that is located on mounted
drive via fstab in Ubuntu as follows:

//some.windows.share/share$ /media/remoteDir cifs
iocharset=utf8,credentials=/.../.../.credentialsFile,file_mode=0775,dir_mode=0775,uid=userNumber,gid=groupNumber

I can read/write to the directories outside of GRASS.  

When I start grass65svn and navigate the workspace on the server, I cannot
open it, but when I check permissions with ls -l it says I have rwx
permissions.  I get an error message that says GRASS cannot find the mapsset
I am trying to open.

I can open the same mapset if it is on my local drive.  Same permissions on
the local directory with ls -l.

Any help would be  greatly appreciated.

Thank you.

 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/mapset-not-found-problem-with-file-permissions-tp6937759p6937759.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


Re: [GRASS-user] Is it possible to export a Raster to KML

2011-10-27 Thread Markus Neteler
On Wed, Oct 26, 2011 at 11:35 AM, Markus Metz
markus.metz.gisw...@googlemail.com wrote:
 katrin eggert wrote:
 Hi
 Maybe it would be better to explain that in manual entry. Just one more
 question: what is the EPSG code for that projection?

 http://www.google.com/search?q=google+kml+epsg
 - 4326

Note that KML expects data to be in Latitude-Longitude using
the WGS84 datum and EGM96 vertical datum as the manual
says. This is not exactly EPSG:4326.

I have added a map with geoid undulations in Trentino, Italy
here:
http://grass.osgeo.org/wiki/Global_datasets#EGM2008_Geoid_Data

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


Re: [GRASS-user] Random Forest Classifier

2011-10-27 Thread Markus Neteler
On Wed, Oct 26, 2011 at 10:30 AM, Mohammed Rashad
mohammedrasha...@gmail.com wrote:

 Hi All,
 I am searching for an example of image classification using Random Forest
 classifier. I found R has a package for random forest classification.
 Anyone has done this classification using R and GRASS?
 please provide an example and tell me some sample data

(posted earlier to osgeo-discuss, here for the record)

I have collected some related articles:
http://www.citeulike.org/user/neteler/tag/randomforest

We have published on some years ago:
http://www.citeulike.org/user/neteler/article/172938
GIS and the Random Forest Predictor: Integration in R for Tick-Borne
Disease Risk Assessment

Furthermore, we are currently proof-reading our new edited book:

http://www.springer.com/earth+sciences+and+geography/geographical+information+systems/book/978-3-642-10594-4

which contains a related chapter.

 Any language or package  example no problem.
 Does anyone did it in R?

I have some (old) material here:
http://www.grassbook.org/neteler/shortcourse_grass2003/notes7.html

It is using rpart() but the syntax is pretty similar to randomForest().

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


Re: [GRASS-user] set up Grass 7 to run using eclipse or Ubuntu?

2011-10-27 Thread Markus Neteler
On Thu, Oct 27, 2011 at 10:31 AM, Matthew Mulbrandon
mulb...@hotmail.com wrote:
 Hello,

 Just wondering if anyone has an example of how to set up python environment
 variables for grass 7 in Ubuntu. I am assuming it is different form Grass
 6.5.

I don't think that there are fundamental differences in
setting up the environment.

 I am particularity interested if people are running Grass 7 from
 eclipse.

This may help.
http://grass.osgeo.org/wiki/Eclipse

It's a wiki, please add a GRASS 7 section if needed.

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


Re: [GRASS-user] Reclassify float values

2011-10-27 Thread Markus Neteler
On Wed, Oct 26, 2011 at 6:27 PM, Luisa Peña luisapena1...@gmail.com wrote:
 Greertings
 I saw in r.reclassify help page that this module cannot be applied to float
 data and it advses to multiply by another value. Is there any other
 alternative?

There was recently a dicussion on this in grass-dev:
http://comments.gmane.org/gmane.comp.gis.grass.devel/45499

Maybe it gives some insights.

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


Re: [GRASS-user] mapset not found: problem with file permissions?

2011-10-27 Thread Glynn Clements

Damian M wrote:

 I am having a difficult time accessing a workspace that is located on mounted
 drive via fstab in Ubuntu as follows:
 
 //some.windows.share/share$ /media/remoteDir cifs
 iocharset=utf8,credentials=/.../.../.credentialsFile,file_mode=0775,dir_mode=0775,uid=userNumber,gid=groupNumber
 
 I can read/write to the directories outside of GRASS.  
 
 When I start grass65svn and navigate the workspace on the server, I cannot
 open it, but when I check permissions with ls -l it says I have rwx
 permissions.  I get an error message that says GRASS cannot find the mapsset
 I am trying to open.
 
 I can open the same mapset if it is on my local drive.  Same permissions on
 the local directory with ls -l.
 
 Any help would be  greatly appreciated.

If you want to select a mapset as the current mapset, you must be the
owner; write permission is insufficient.

This check is skipped for Windows versions of GRASS, but is performed
for Unix versions regardless of the filesystem type.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user



[GRASS-user] Re: mapset not found: problem with file permissions?

2011-10-27 Thread Damian M
Glen,

Thank you for your reply.  I am the owner of the folder and all contents.  I
set it when I mount the directory.  (from cifs mount command in fstab:
...uid=myusername,gid=myusername...)  

-Damian

 

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/mapset-not-found-problem-with-file-permissions-tp6937759p6938787.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


Re: [GRASS-user] ps.map arrow head

2011-10-27 Thread Hamish
Vincent wrote:
 a bit of squeezed with ps.map : is there a simple way to
 draw arrowheads on top of vector lines in a map composition ?

you mean like 'd.vect disp=dir' ?  if so, not that I know of.

 I did not find any option in vlines instruction. Did I miss
 it ?
 
 Perhaps should I extract tnodes (or fnodes) from the source
 lines vector, then print arrowheads as symbols with vpoints
 instruction.

you should make a new  symbol without a tail in case the
rotational alignment is not perfect, with the center at the
arrow point.

 But I can't figure out how I can obtain the angle to rotate
 symbols the right way, ie finding the azimuth of the last (or
 first) segment of each line...

perhaps 'v.to.points dmax=' or v.lrs to set the along-line
node points. unfortunately there is no doffset= option to go
with v.to.point's dmax=, as it would be nice to do like
 dmax=100 doffset=50
to get midpoints of 100m segments (see also the more complicated
v.segment module)

once 100m line segments are created (sorry no exact recipe for
that comes to mind but it must be possible; maybe together with
the v.to.points nodes?) you can use v.to.db to get azimuth of
the line segments uploaded to the line segment vector's DB, then
use db.execute to attach those to the point vector map, and any
+90 degree rotation if it is needed. 
(typically grass uses degrees CCW from the +x axis for rotation)

 If anyone experienced this, I would be glad to know how you
 proceeded.

hopefully the above gives you enough to figure something out.
if so, please add the trick to the wiki, or maybe we could
make a script. (ISTR there is something similar for ps.map
there already, it would be good for things like railroad -+--+-
lines)

even better is if there is a postscript trick for this, then
we could add


--+--


somehow, like adding a  direction=No|yes|tick  instruction to
vlines. if so we probably want to add a tick_spacing instruction
too, probably using points as the distance unit for that, 
defaulting to something like 8mm.


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


Re: [GRASS-user] ps.map arrow head

2011-10-27 Thread Vincent Bain
Thank you Hamish for these suggestions,
I'll probably dig in the database direction, in order to create a labels
layer, easy to add in the postscript composition.

Bye,
Vincent

Le jeudi 27 octobre 2011 à 21:51 -0700, Hamish a écrit :
 Vincent wrote:
  a bit of squeezed with ps.map : is there a simple way to
  draw arrowheads on top of vector lines in a map composition ?
 
 you mean like 'd.vect disp=dir' ?  if so, not that I know of.
 
  I did not find any option in vlines instruction. Did I miss
  it ?
  
  Perhaps should I extract tnodes (or fnodes) from the source
  lines vector, then print arrowheads as symbols with vpoints
  instruction.
 
 you should make a new  symbol without a tail in case the
 rotational alignment is not perfect, with the center at the
 arrow point.
 
  But I can't figure out how I can obtain the angle to rotate
  symbols the right way, ie finding the azimuth of the last (or
  first) segment of each line...
 
 perhaps 'v.to.points dmax=' or v.lrs to set the along-line
 node points. unfortunately there is no doffset= option to go
 with v.to.point's dmax=, as it would be nice to do like
  dmax=100 doffset=50
 to get midpoints of 100m segments (see also the more complicated
 v.segment module)
 
 once 100m line segments are created (sorry no exact recipe for
 that comes to mind but it must be possible; maybe together with
 the v.to.points nodes?) you can use v.to.db to get azimuth of
 the line segments uploaded to the line segment vector's DB, then
 use db.execute to attach those to the point vector map, and any
 +90 degree rotation if it is needed. 
 (typically grass uses degrees CCW from the +x axis for rotation)
 
  If anyone experienced this, I would be glad to know how you
  proceeded.
 
 hopefully the above gives you enough to figure something out.
 if so, please add the trick to the wiki, or maybe we could
 make a script. (ISTR there is something similar for ps.map
 there already, it would be good for things like railroad -+--+-
 lines)
 
 even better is if there is a postscript trick for this, then
 we could add
 
 
 --+--
 
 
 somehow, like adding a  direction=No|yes|tick  instruction to
 vlines. if so we probably want to add a tick_spacing instruction
 too, probably using points as the distance unit for that, 
 defaulting to something like 8mm.
 
 
 Hamish
 


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