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 Pretorius:

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


Re: [GRASS-user] OCR

2011-05-04 Thread Markus Neteler
On Wed, May 4, 2011 at 11:18 AM, ALT SHN  wrote:
> 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?

You could try with this software:
http://www.gnu.org/software/ocrad/ocrad.html

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