Re: [GRASS-user] v.to.rast gives empty raster layer

2011-05-04 Thread Hanlie Pretorius
Hi Moritz,

I'm not sure what you mean by 'Maris' first part of the solution'. I
saw only one part to Maris's suggestion (refining the region's
resolution) because I said in my initial mail that I had set extents
of the region to the contours_20m vector layer. Initially I did have a
resolution of 20m and got an empty raster layer as a result.

I share Micha's confusion about this. Although it doesn't make much
sense to have a 20m cell size (my bad) I would have thought that
v.to.rast would still have given me an output.

Regards
Hanlie

2011/5/3, Moritz Lennert mlenn...@club.worldonline.be:
 On 03/05/11 15:47, Micha Silver wrote:
 On 05/03/2011 04:34 PM, Moritz Lennert wrote:

 On 03/05/11 10:20, Micha Silver wrote:
 On 05/03/2011 09:11 AM, Hanlie Pretorius wrote:

 Hi Maris,

 Thanks, your suggestion worked. With the region's resolution set to
 5m, I got some output.


 Hi Maris:
 Sorry for butting in on this, but I don't understand why the region
 resolution should make any difference to v.to.rast??
 Would you mind to explain?

 From the v.to.rast manual:

 v.to.rast will only affect data in areas lying inside the boundaries
 of the current geographic region. Before running v.to.rast, the user
 should therefore ensure that the current geographic region is
 correctly set and that the region resolution is at the desired level.



 Thanks, Moritz
 What I'm trying to understand is the question about resolution. Would
 you expect, as
 Hanlie indicted, to get *no output* in the raster because of too course
 resolution?
 He claims that at 20m x 20m v.to.rast of a line feature created all NULL
 cells, but at 5m x 5m the lines did appear in the raster.
 ??

 Hanlie didn't tell us whether he applied Maris' first part of the
 solution as well (but I guess he did):

 g.region vect=contours_20m

 I agree with you that resolution does not make the difference. However,
 I guess that Maris meant that having a 20m resolution seems too coarse
 for 20m contour lines, but even that is not clear as all depends on the
 topography of the region in question. If you have 100m altitude change
 for 50m horizontal change, then 20m is a bad choice of resolution, but
 if you have 100m altitude change for 1km horizontal change, it should be
 more than enough.

 So, in conclusion, the region's resolution setting can make a huge
 difference in v.to.rast, but in this particular case does not explain
 why there was no output. This is certainly linked to the region's extension.

 Moritz


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


Re: [GRASS-user] v.to.rast gives empty raster layer

2011-05-04 Thread Moritz Lennert

On 04/05/11 08:42, Hanlie Pretorius wrote:
 Hi Moritz,

 I'm not sure what you mean by 'Maris' first part of the solution'. I
 saw only one part to Maris's suggestion (refining the region's
 resolution) because I said in my initial mail that I had set extents
 of the region to the contours_20m vector layer. Initially I did have a
 resolution of 20m and got an empty raster layer as a result.

 I share Micha's confusion about this. Although it doesn't make much
 sense to have a 20m cell size (my bad) I would have thought that
 v.to.rast would still have given me an output.

Rereading the original mail I see this:


2011/5/2, Hanlie Pretoriushanlie.pretor...@gmail.com:

r.info for the result is:
| Layer: contours_20m@CDNGI_DEM Date: Mon May 02 14:18:00 2011
| Mapset: CDNGI_DEM Login of Creator: hanlie
| Location: SA_Lo_29E
| DataBase: F:\grassdata
| Title: Labels ( contours_20m@CDNGI_DEM )
| Timestamp: none
|

|
| Type of Map: raster Number of Categories: 0

[snip]

| Rows: 1772
| Columns: 1750
| Total Cells: 3101000
| Projection: Transverse Mercator
| N: -3121229.69982072 S: -3156672.30728643 Res:
20.00147148
| E: -32474.90929218 W: -67483.27873573 Res: 20.00478254
| Range of data: min = 1620 max = 2460

[snip]   


As you can see from the number of categories (0), there is no
information in this raster file.


There are no category values, but there are data values, so your map 
actually is not empty.


What does r.stats contours_20m@CDNGI_DEM give you ?

1) v.to.rast does create category labels by default. If you use the 
'labelcol' parameter, then you get category values.


Example in the NC demo dataset:

v.to.rast elev_ned10m_cont10m out=contours col=level

r.info contours:

Number of Categories: 0
Range of data:min = 60.00  max = 150.00

2) v.to.rast elev_ned10m_cont10m out=contours col=level labelcol=cat

r.info contours:

Number of Categories: 150
Range of data:min = 60.00  max = 150.00

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


Re: [GRASS-user] v.to.rast gives empty raster layer

2011-05-04 Thread Hanlie Pretorius
Oh, I see, thanks.

r.stats input=contours_20m@CDNGI_DEM
1620-1623.294118
1639.764706-1643.058824
1659.529412-1662.823529
1679.294118-1682.588235
1699.058824-1702.352941
1718.823529-1722.117647
1738.588235-1741.882353
1758.352941-1761.647059
1778.117647-1781.411765
1797.882353-1801.176471
1817.647059-1820.941176
1837.411765-1840.705882
1857.176471-1860.470588
1876.941176-1880.235294
1900-1903.294118
1919.764706-1923.058824
1939.529412-1942.823529
1959.294118-1962.588235
1979.058824-1982.352941
1998.823529-2002.117647
2018.588235-2021.882353
2038.352941-2041.647059
2058.117647-2061.411765
2077.882353-2081.176471
2097.647059-2100.941176
2117.411765-2120.705882
2137.176471-2140.470588
2156.941176-2160.235294
2180-2183.294118
2199.764706-2203.058824
2219.529412-.823529
2239.294118-2242.588235
2259.058824-2262.352941
2278.823529-2282.117647
2298.588235-2301.882353
2318.352941-2321.647059
2338.117647-2341.411765
2357.882353-2361.176471
2377.647059-2380.941176
2397.411765-2400.705882
2417.176471-2420.470588
2436.941176-2440.235294
2456.705882-2460
*
(Wed May 04 10:35:47 2011) Command finished (0 sec)

For some reason I couldn't get the raster contours to display
yesterday - another reason why I though the layer was empty. I
adjusted the colour table an re-rendered the map with no effect.
Today, however, it works and I can see it.

Sorry about the confusion.

2011/5/4, Moritz Lennert mlenn...@club.worldonline.be:
 On 04/05/11 08:42, Hanlie Pretorius wrote:
   Hi Moritz,
  
   I'm not sure what you mean by 'Maris' first part of the solution'. I
   saw only one part to Maris's suggestion (refining the region's
   resolution) because I said in my initial mail that I had set extents
   of the region to the contours_20m vector layer. Initially I did have a
   resolution of 20m and got an empty raster layer as a result.
  
   I share Micha's confusion about this. Although it doesn't make much
   sense to have a 20m cell size (my bad) I would have thought that
   v.to.rast would still have given me an output.

 Rereading the original mail I see this:

 2011/5/2, Hanlie Pretoriushanlie.pretor...@gmail.com:
 r.info for the result is:
 | Layer: contours_20m@CDNGI_DEM Date: Mon May 02 14:18:00 2011
 | Mapset: CDNGI_DEM Login of Creator: hanlie
 | Location: SA_Lo_29E
 | DataBase: F:\grassdata
 | Title: Labels ( contours_20m@CDNGI_DEM )
 | Timestamp: none
 |

 |
 | Type of Map: raster Number of Categories: 0
 [snip]
 | Rows: 1772
 | Columns: 1750
 | Total Cells: 3101000
 | Projection: Transverse Mercator
 | N: -3121229.69982072 S: -3156672.30728643 Res:
 20.00147148
 | E: -32474.90929218 W: -67483.27873573 Res: 20.00478254
 | Range of data: min = 1620 max = 2460
 [snip]   

 As you can see from the number of categories (0), there is no
 information in this raster file.

 There are no category values, but there are data values, so your map
 actually is not empty.

 What does r.stats contours_20m@CDNGI_DEM give you ?

 1) v.to.rast does create category labels by default. If you use the
 'labelcol' parameter, then you get category values.

 Example in the NC demo dataset:

 v.to.rast elev_ned10m_cont10m out=contours col=level

 r.info contours:

 Number of Categories: 0
 Range of data:min = 60.00  max = 150.00

 2) v.to.rast elev_ned10m_cont10m out=contours col=level labelcol=cat

 r.info contours:

 Number of Categories: 150
 Range of data:min = 60.00  max = 150.00

 Moritz

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


[GRASS-user] DEM resolution from r.surf.contour

2011-05-04 Thread Hanlie Pretorius
Hi,

I'd like to ask a question related to another question I was asking
recently about converting contour vectors to rasters and creating a
DEM from the raster contours using r.surf.contour.

My supplied vector contour layer has 20m intervals between contour
lines. When I convert this to raster, the smallest region resolution I
can use is 5m, otherwise v.to.rast runs out of memory.

When I use r.surf.contour to create the DEM from the raster, which
region resolution makes sense then? I set it to 20m because of the
contour interval, but I'm starting to think that's not the best option
because the interpolation between two contour lines should be as fine
as possible.

Any thoughts?

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


[GRASS-user] OCR

2011-05-04 Thread ALT SHN
Hello,

This might seem a Little off topic, but maybe someone here can help me.

I need to extract toponomical data from old digitized paper maps. I wish to
explore *Optical character recognition (OCR).

Does anyone has a suggestion/experience with this kind of challenge?

Thank you,

André Mano
*
-- 
---
Associação Leonel Trindade
SOCIEDADE DE HISTÓRIA NATURAL

Apartado 25 2564-909 Torres Vedras Portugal
Sede e Biblioteca: rua Cavaleiros da Espora Dourada, 27A 2560 Torres Vedras

Laboratório de Paleontologia e Paleoecologia: Polígono Industrial do Alto do
Ameal 2565-641 Ramalhal
http://alt-shn.blogspot.com
www.alt-shn.org
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] g.extension lipo problem

2011-05-04 Thread Jason Lessels
Hi,
I am running os x snow leopard (10.6.7). I have tried to install an extension 
in GRASS 6.4.1 (2011), but it throws a compilation error. I have searched the 
lists, with no luck, could anyone help me with this problem.
Thanks
Jason

g.extension extension=i.landsat.toar
Fetching i.landsat.toar from GRASS-Addons SVN (be patient)...
Ai.landsat.toar/landsat_set.c
Ai.landsat.toar/local_proto.h
Ai.landsat.toar/main.c
Ai.landsat.toar/description.html
Ai.landsat.toar/landsat.c
Ai.landsat.toar/earth_sun.c
Ai.landsat.toar/landsat.h
Ai.landsat.toar/landsat_met.c
Ai.landsat.toar/Makefile
Ai.landsat.toar/earth_sun.h
 U   i.landsat.toar
Checked out revision 46186.
Compiling i.landsat.toar...
test -d OBJ.i386-apple-darwin10.7.0 || mkdir -p OBJ.i386-apple-darwin10.7.0
gcc 
-I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include 
 -Os -fexceptions   -arch i386 -arch x86_64  -DPACKAGE=\grassmods\  
-I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include 
-o OBJ.i386-apple-darwin10.7.0/earth_sun.o -c earth_sun.c
gcc 
-I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include 
 -Os -fexceptions   -arch i386 -arch x86_64  -DPACKAGE=\grassmods\  
-I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include 
-o OBJ.i386-apple-darwin10.7.0/landsat.o -c landsat.c
landsat.c:4:23: error: grass/gis.h: No such file or directory
landsat.c:4:23: error: grass/gis.h: No such file or directory
lipo: can't figure out the architecture type of: 
/Users/jasonlessels/git/muttama/gis/muttama/muttama/.tmp/macintosh-3.localdomain/29713.0/ccdiXykN.out
make: *** [OBJ.i386-apple-darwin10.7.0/landsat.o] Error 1
ERROR: Compilation failed, sorry. Please check above error 
messages.___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] g.extension lipo problem

2011-05-04 Thread William Kyngesburye
Known issue - g.extension doesn't work on a Mac (or other systems?) without the 
original compiled source.

I have a modbuild in /Library/GRASS/6.4, see the readme there for details.  
One aditional thing to do before using it is copy all the static *.a libraries 
from the GRASS application (/Applications/GRASS-6.4.app/Contents/MacOS/lib) to 
the modbuild/Modules/lib folder.  Note that modbuild does not install the 
module, just compiles it, you must do that manually.

You will also need to download the addon source manually.  This should do it 
(do it in the modbuild/module) folder):

svn co https://svn.osgeo.org/grass/grass-addons/[moduleclass]/[module] [module]

where [moduleclass] is the named type of module (from the first dotted part of 
the module name, ie imagery for i, and [module] is the full module name, ie 
i.landsat.toar.

On May 4, 2011, at 1:11 PM, Jason Lessels wrote:

 Hi,
 I am running os x snow leopard (10.6.7). I have tried to install an extension 
 in GRASS 6.4.1 (2011), but it throws a compilation error. I have searched the 
 lists, with no luck, could anyone help me with this problem.
 Thanks
 Jason
 
 g.extension extension=i.landsat.toar
 Fetching i.landsat.toar from GRASS-Addons SVN (be patient)...
 Ai.landsat.toar/landsat_set.c
 Ai.landsat.toar/local_proto.h
 Ai.landsat.toar/main.c
 Ai.landsat.toar/description.html
 Ai.landsat.toar/landsat.c
 Ai.landsat.toar/earth_sun.c
 Ai.landsat.toar/landsat.h
 Ai.landsat.toar/landsat_met.c
 Ai.landsat.toar/Makefile
 Ai.landsat.toar/earth_sun.h
 U   i.landsat.toar
 Checked out revision 46186.
 Compiling i.landsat.toar...
 test -d OBJ.i386-apple-darwin10.7.0 || mkdir -p OBJ.i386-apple-darwin10.7.0
 gcc 
 -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include
   -Os -fexceptions   -arch i386 -arch x86_64  -DPACKAGE=\grassmods\  
 -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include
  -o OBJ.i386-apple-darwin10.7.0/earth_sun.o -c earth_sun.c
 gcc 
 -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include
   -Os -fexceptions   -arch i386 -arch x86_64  -DPACKAGE=\grassmods\  
 -I/Users/Shared/src/GRASS/grass-6.4.1-snow/dist.i386-apple-darwin10.7.0/include
  -o OBJ.i386-apple-darwin10.7.0/landsat.o -c landsat.c
 landsat.c:4:23: error: grass/gis.h: No such file or directory
 landsat.c:4:23: error: grass/gis.h: No such file or directory
 lipo: can't figure out the architecture type of: 
 /Users/jasonlessels/git/muttama/gis/muttama/muttama/.tmp/macintosh-3.localdomain/29713.0/ccdiXykN.out
 make: *** [OBJ.i386-apple-darwin10.7.0/landsat.o] Error 1
 ERROR: Compilation failed, sorry. Please check above error 
 messages.___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

-
William Kyngesburye kyngchaos*at*kyngchaos*dot*com
http://www.kyngchaos.com/

Earth: Mostly harmless

- revised entry in the HitchHiker's Guide to the Galaxy


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