[GRASS-user] Re: grassuser Digest, Vol 11, Issue 40

ahmed giwa medoline812 at yahoo.com
Wed Mar 21 12:06:05 EDT 2007


Unsubscribe this mail please


----- Original Message ----
From: "grassuser-request at grass.itc.it" <grassuser-request at grass.itc.it>
To: grassuser at grass.itc.it
Sent: Wednesday, March 21, 2007 3:54:59 PM
Subject: grassuser Digest, Vol 11, Issue 40


Send grassuser mailing list submissions to
    grassuser at grass.itc.it

To subscribe or unsubscribe via the World Wide Web, visit
    http://grass.itc.it/mailman/listinfo/grassuser
or, via email, send a message with subject or body 'help' to
    grassuser-request at grass.itc.it

You can reach the person managing the list at
    grassuser-owner at grass.itc.it

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grassuser digest..."


Today's Topics:

   1. Re: v.to.rast "unknown use type" (Markus Neteler)
   2. Re: r.surf.contour (Markus Neteler)
   3. rasterizing points (xrubio at arsystel.com)
   4. Re: project units vs. imported image units ? (Ricardo Oliveira)
   5. Re: rasterizing points (Markus Neteler)
   6. Inputting vector points in non Lat/Lon cords (Bryan Main)
   7. create a slope vector map (Luca Penasa)
   8. Help the newbie importing data into GRASS (Jorge Echeverri)
   9. Re: Encountering an error importing shapefiles with    v.in.ogr
      (Thomas Adams)


----------------------------------------------------------------------

Message: 1
Date: Wed, 21 Mar 2007 09:23:33 +0100
From: Markus Neteler <neteler at itc.it>
Subject: Re: [GRASS-user] v.to.rast "unknown use type"
To: Seb <spluque at gmail.com>
Cc: grassuser at grass.itc.it
Message-ID: <4600EB85.5070603 at itc.it>
Content-Type: text/plain; charset=ISO-8859-1

Seb wrote on 03/21/2007 04:08 AM:
> Hi,
>
> I'm having problems with the following call to rasterize a vector:
>
>
> v.to.rast input=test output=test use=z type=point layer=1 value=1 rows=4096
>
>
> The vector contains 1 minute gridded GEBCO bathymetry data, which I
> imported with v.in.ascii, assigning depth data to the 'z' coordinate.
> However, the call above gives the error message:
>
> ---<---------------cut here---------------start-------------->---
> Converted areas: [0] of [0]
>
> Converted points/lines: [329427] of [329427]
>
> Unknown use type: 4
> ---<---------------cut here---------------end---------------->---
>
>
> I'd greatly appreciate some clues on what may be going on.
>   

I have fixed this yesterday, was running into the same problem.

Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------



------------------------------

Message: 2
Date: Wed, 21 Mar 2007 09:25:21 +0100
From: Markus Neteler <neteler at itc.it>
Subject: Re: [GRASS-user] r.surf.contour
To: GRASS user list <grassuser at grass.itc.it>
Message-ID: <4600EBF1.70007 at itc.it>
Content-Type: text/plain; charset=ISO-8859-1

Amaginary Studios wrote on 03/21/2007 12:10 AM:
> I am running r.surf.contour and it is ... taking quite a long time...
>
> I am just wondering how long the average processing time is with the
> following g.region
>
> /projection: 1 (UTM)/
> /zone:       9/
> /datum:      nad83/
> /ellipsoid:  grs80/
> /north:      6052143.70894/
> /south:      6018782.69306/
> /west:       644196.986023/
> /east:       657085.826063/
> /nsres:      4.00012181/
> /ewres:      4.00026072/
> /rows:       8340/
> /cols:       3222/
> /cells:      26 871 480/
>
Sidenote:
Not sure if a resolution of /4.00012181 is desired.
If you want to get it to 4.0, run

g.region -a -p res=4
and the coordinates box will be slightly extended to match the
resolution precisely.

Markus

/

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------



------------------------------

Message: 3
Date: Wed, 21 Mar 2007 11:38:35 +0100 (CET)
From: xrubio at arsystel.com
Subject: [GRASS-user] rasterizing points
To: grassuser at grass.itc.it
Message-ID:
    <56237.161.116.25.209.1174473515.squirrel at mail.arsystel.com>
Content-Type: text/plain;charset=iso-8859-1


Hi all, I'm trying to raster a vector layer with 3 or 4 points but I don't
know why it is not working.
The command I'm using is:

v.to.rast input=landmarks_v output=landmarks_r value=1 use=val

but it simply generates an empty raster map. I think that grass is trying
to rasterize lines:

Loading vector information ...                  0 mins 00 secs
Sorting areas by size ... 0 areas               0 mins 00 secs
Processing lines ... 4 lines                    0 mins 00 secs
Writing raster map ...                          0 mins 00 secs
Creating support files for raster map ...       0 mins 00 secs

but as the information are points it is not generating any line. I want to
create a raster map with null values except for 3 or 4 cells (where there
are points) with '1'.
Any idea about how it can be done?

Thanks!

Xavi



------------------------------

Message: 4
Date: Wed, 21 Mar 2007 10:51:31 -0000
From: "Ricardo Oliveira" <autopilot at oniduo.pt>
Subject: Re: [GRASS-user] project units vs. imported image units ?
To: <grassuser at grass.itc.it>
Message-ID: <CD40D420FBE630488EF0CC85AED081423B271F at RVS2.at.isp>
Content-Type: text/plain; charset="iso-8859-1"

Thanks for the quick replies.
I have been testing the solutions:

I can use g.region to create different regions (with specific grid size) so they can match the resolution of the tifs i am importing (this will be useful because the tifs have different resolutions). After that r.region -c will recompute the image to the extents of the current region. This seems to be what i needed :D

Again, thank you
Ricardo

On Tue, 20 Mar 2007 13:19:23 -0700, "Amaginary Studios"
<amagine at telus.net> said:
> Hmmm,
> 
> I believe you will need to specify the correct "resolution" in your  
> "g.region" settings which will ... match the resolution of your .tiff  
> files
> 
> .tfw files are simply Text files so I suppose you could create your  
> own within a text editor.
> 
> for example a .twf file with the following
> 
> ****
> 
> 1         nresolution
> 0         x-pixel position reference point
> 0         y-pixel position reference point
> -1        sresolution
> 0         x-postion reference
> 0         y-position reference
> 
> ****
> 
> says,  that each pixel in the tiff image is equal to 1x1 (in your  
> case probably meters).  and the Top left corner is referenced at 0m x  
> 0m.
> 
> So, it is a matter of matching your image resolution size to the  
> correct resolution region settings in GRASS.
> 
> I hope this helps a bit...
> 
> Mars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://grass.itc.it/pipermail/grassuser/attachments/20070321/c8510632/attachment-0001.html

------------------------------

Message: 5
Date: Wed, 21 Mar 2007 13:55:14 +0100
From: Markus Neteler <neteler at itc.it>
Subject: Re: [GRASS-user] rasterizing points
To: grassuser at grass.itc.it
Message-ID: <46012B32.8070806 at itc.it>
Content-Type: text/plain; charset=ISO-8859-1

xrubio at arsystel.com wrote on 03/21/2007 11:38 AM:
> Hi all, I'm trying to raster a vector layer with 3 or 4 points but I don't
> know why it is not working.
> The command I'm using is:
>
> v.to.rast input=landmarks_v output=landmarks_r value=1 use=val
>
> but it simply generates an empty raster map. I think that grass is trying
> to rasterize lines:
>
> Loading vector information ...                  0 mins 00 secs
> Sorting areas by size ... 0 areas               0 mins 00 secs
> Processing lines ... 4 lines                    0 mins 00 secs
> Writing raster map ...                          0 mins 00 secs
> Creating support files for raster map ...       0 mins 00 secs
>
> but as the information are points it is not generating any line. I want to
> create a raster map with null values except for 3 or 4 cells (where there
> are points) with '1'.
> Any idea about how it can be done?
>   

what does
r.univar landmarks_r
say?

To see the map, try this:

g.region rast=landmarks_r -p
d.erase
d.rast landmarks_r


Markus

------------------
ITC -> dall'1 marzo 2007 Fondazione Bruno Kessler
ITC -> since 1 March 2007 Fondazione Bruno Kessler
------------------



------------------------------

Message: 6
Date: Wed, 21 Mar 2007 10:03:25 -0400
From: "Bryan Main" <bryan.main at gmail.com>
Subject: [GRASS-user] Inputting vector points in non Lat/Lon cords
To: grassuser at grass.itc.it
Message-ID:
    <33aba5420703210703q178f13deg2c9ee56ba6837988 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I'm having trouble finding out if I can input vector points in a
different coordinate system other then Lat/Long.  I'm trying to use
the Irish Grid system since all of my information is already in that
format.  Is this possible, or will I have to convert all of my points
from the Irish grid to lat/long?

Bryan



------------------------------

Message: 7
Date: Wed, 21 Mar 2007 15:32:17 +0100
From: Luca Penasa <luca.penasa at email.it>
Subject: [GRASS-user] create a slope vector map
To: grassuser at grass.itc.it
Message-ID: <460141F1.8020805 at email.it>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

i would like to create a vector map with vectors rapresenting the slope...
i need to create these features:
- every vector should point to the max slope line, with an arrow 
representig the flow direction
- the lenght should rapresent the slope value in degrees, and the vector 
line should start from the center of the square
- i want to have a vector for every 10x10m square, with an average slope 
value rapresented by the vector lenght

I know how to create the slope map, with 10x10m resolution... but.. how 
can i create the vector map with all the features i said???

How can i do this??? any suggestions????

Sorry for my english
Thanks, Luca


--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Analisi di Bilancio: come capire correttamente un bilancio aziendale
* Esempi, modelli pratici, software utili
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6199&d=21-3



------------------------------

Message: 8
Date: Wed, 21 Mar 2007 16:52:49 +0100
From: Jorge Echeverri <jorge.echeverri at Stein.de>
Subject: [GRASS-user] Help the newbie importing data into GRASS
To: grassuser at grass.itc.it
Message-ID: <1174492369.3837.27.camel at linux-a46z.site>
Content-Type: text/plain; charset="us-ascii"

Hi,

I need to do the following:

Display a sewer network and generate charts with classification in a
colour scale based on attributes like Age, Material, Diameter, etc.

Data are in a MySQL database:

The network is geometrically defined by the relationship between these
two tables:

tbl_line:
"LINE_ID","FROM_NODE_ID","TO_NODE_ID"
1,1,2
tbl_node
"NODE_ID","X_COORDINATE","Y_COORDINATE","Z_COORDINATE","NET_TYPE_ID"
1,3400630.04,5718486.603,,1,

Assuming that attributes where also stored in the same table: tbl_line,
which is not the case, how would be the better way to perform this task?
Attributes are actually stored in another table, tbl_basedata, which is
in the same database and has a 1:c relationship to tbl_line.

So far I have managed to connect to the MySQL-database but cannot figure
out how to further proceed.

Previously I had tried following workaround:
1.I performed a MySQL-query on tbl_node and tbl_line to obtain the
couples of points defining a line and stored this in a .csv-file. 
2. From this I created a new file with an awk-programm like this:
#'X_COORDINATE, Y_COORDINATE'
L 2 0
3400630.04 5718486.603
3400639.238 5718515.776
L 2 0
3400639.238 5718515.776
3400648.641 5718546.057
L 2 0
3400648.641 5718546.057
3400665.041 5718562.99
L 2 0
3400665.041 5718562.99
3400625.996 5718597.349
L 2 0 
3.I successfully imported this with v.in.ascii and can depict the
geometry.

But I don't think that is the most logical way to do it as GRASS can
connect directly to the DB. Any suggestions???

Thanks in advance
-- 
Jorge Echeverri
SP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://grass.itc.it/pipermail/grassuser/attachments/20070321/59681e75/attachment-0001.html

------------------------------

Message: 9
Date: Wed, 21 Mar 2007 11:53:59 -0400
From: Thomas Adams <Thomas.Adams at noaa.gov>
Subject: Re: [GRASS-user] Encountering an error importing shapefiles
    with    v.in.ogr
To: Raffaele Morelli <raffaele.morelli at gmail.com>
Cc: GRASS user list <grassuser at grass.itc.it>
Message-ID: <46015517.4090205 at noaa.gov>
Content-Type: text/plain; charset=windows-1252; format=flowed

Raffaele,

After further testing, I do see the same problem you have had, 
namely,"(some) areas which are not available after using v.in.ogr." This 
is very apparent if I randomly color the polygons — some do not get 
filled. Also, if I do a v.to.rast conversion, I get holes in the newly 
created raster.

Does anyone have thoughts on this?

Regards,
Tom


Raffaele Morelli wrote:
>
>     Cannot display areas, topology not available.
>
>     I am virtually certain that I was able to successfully import this
>     and
>     other shapefiles in previous versions of GRASS (GRASS 4.x & GRASS
>     5.x).
>     The shapefiles files include the *.dbf, *.shp, and *.shx files,
>     which I
>     think, should be enough. If I import shapefiles from the US National
>     Atlas (created by the USGS), I have no problems. It seems that
>     with all
>     shapefiles generated by my office using ArcGIS 9.0, I have this
>     problem.
>
>
> Similar problem with shapefiles generated using ArcGIS, I recently 
> posted a topic about (some) areas which are not available after v.in.ogr.
>
>     Does anyone have suggestions as to what could be going on? 
>
>
> Hamish suggested using 'v.in.ogr -c ' (does not clean polygons) which 
> didn't worked for me.
> I partially solved using v.in.ogr without min_area and snap parameters 
> but when patching adjacent shapes I do not some polygons lost area.
> Are you experiencing something similar with ArcGIS shapes?
>
> regards
> raffaele
> ------------------------------------------------------------------------
>
> _______________________________________________
> grassuser mailing list
> grassuser at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grassuser
>   


-- 
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177

EMAIL:    thomas.adams at noaa.gov

VOICE:    937-383-0528
FAX:    937-383-0033



------------------------------

_______________________________________________
grassuser mailing list
grassuser at grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser


End of grassuser Digest, Vol 11, Issue 40
*****************************************


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20070321/57e9a5bc/attachment.html


More information about the grass-user mailing list