[GRASS-dev] r.external nodata problem

2009-12-03 Thread Jamie Adams
Hello all,

I'm having an issue where r.mapcalc is incorrectly detecting nodata when
using an r.external raster.  My basic work flow is something like this:

   - import raster using r.external
   - set the region to include a 1 pixel buffer around the image
   - run r.mapcalc with isnull to output nodata as 1.  The 1px buffer
   ensures that I get a single, continuous nodata region around the raster.

With certain r.external rasters, r.mapcalc is only returning nodata for the
first and last rows.  The first and last columns have the top and bottom
pixels (first and last row), but nothing else.

If I do the exact same routine with r.in.gdal, a continuous nodata region
around the raster is identified by r.mapcalc.

I reported this bug last year, but stopped seeing the problem and didn't
follow up.  Looks like it's still there, I'll attach some files for testing.

http://trac.osgeo.org/grass/ticket/369

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

Re: [GRASS-dev] v.in.gshhs v2.0 error reading data

2009-08-14 Thread Jamie Adams
That did the trick, thanks for the quick update!

- Jamie

On Fri, Aug 14, 2009 at 9:56 AM, Markus Metz <
markus.metz.gisw...@googlemail.com> wrote:

> Hi,
>
> I've updated v.in.gshhs, it supports now GSHHS data versions 1.4 through to
> 2.0, and issues an error if a version is not supported, telling exactly
> that, no more non-descript error reading data.
>
> v.in.gshhs imports exported as shapefiles display now properly in QGIS, no
> more strange horizontal lines.
>
> Please check out the new version and let me know if it doesn't work for
> you.
>
> Markus M
>
>
> Jamie Adams wrote:
>
>> I grabbed the 2.0 version of gshhs, released 2009-07-15, but can't import
>> it into GRASS.  The module doesn't return much in terms of error
>> information.
>>
>> v.in.gshhs in=gshhs_f.b out=gshhs_f --o
>> Using lat/lon bounds N=90.00 S=-90.00 E=180.00 W=-180.00
>> ERROR: Error reading data
>>
>> I've tried the various levels of detail (f, h, i, l) with the same result.
>>  Based on the readme file there may be some internal changes, but these are
>> beyond me.  Any thoughts?
>>
>> - Jamie
>>
>> GSHHS 2.0 - http://www.soest.hawaii.edu/pwessel/gshhs/index.html
>> 
>>
>> ___
>> grass-dev mailing list
>> grass-dev@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
>>
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] v.in.gshhs v2.0 error reading data

2009-08-11 Thread Jamie Adams
I grabbed the 2.0 version of gshhs, released 2009-07-15, but can't import it
into GRASS.  The module doesn't return much in terms of error information.

v.in.gshhs in=gshhs_f.b out=gshhs_f --o
Using lat/lon bounds N=90.00 S=-90.00 E=180.00 W=-180.00
ERROR: Error reading data

I've tried the various levels of detail (f, h, i, l) with the same result.
Based on the readme file there may be some internal changes, but these are
beyond me.  Any thoughts?

- Jamie

GSHHS 2.0 - http://www.soest.hawaii.edu/pwessel/gshhs/index.html
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] r.clump ordering

2009-03-03 Thread Jamie Adams
Hello all,

I'm writing a script to autodetect the null space bordering a raster while
ignoring interior voids.  I expand the region to slightly larger than the
data area, reclass nulls as 1, and then run r.clump to get discrete groups.


My question is, does r.clump process nulls in any particular order?  From
what I'm seeing, my border null area always ends up being the highest
numbered in r.clump.  Since I need to detect which null clump represents the
border, this would be very convenient.

Any insight?

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

Re: [GRASS-dev] compile error with vdigit nviz

2008-12-11 Thread Jamie Adams
Great, that did it.  Thanks!

On Thu, Dec 11, 2008 at 12:02 PM, Martin Landa wrote:

> 2008/12/11 Jamie Adams :
> > Ok, that helped.  Now I'm only getting an error with vdigit
> >
> >>>cd /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
> >>>make
> > 
> > /usr/bin/ld: cannot find -lgdi
> > collect2: ld returned 1 exit status
> > make: *** [OBJ.x86_64-unknown-linux-gnu/_grass6_wxvdigit.so] Error 1
>
> from
>
> http://svn.osgeo.org/grass/grass/trunk/gui/wxpython/README
>
> """
> First, create a symlink to _gdi_.so shared library
>
> $ sudo ln -s `locate _gdi_.so` /usr/local/lib/libgdi.so
>
> e.g.
>
> $ sudo ln -s
> /usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so
> /usr/local/lib/libgdi.so
>
> Then update LD_LIBRARY_PATH or add '/usr/local/lib' to /etc/ld.so.conf
> (in this case run 'sudo ldconfig').
> """
>
> Martin
>
> --
> Martin Landa  * 
> http://gama.fsv.cvut.cz/~landa<http://gama.fsv.cvut.cz/%7Elanda>*
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] compile error with vdigit nviz

2008-12-11 Thread Jamie Adams
Ok, that helped.  Now I'm only getting an error with vdigit

>>cd /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
>>make

/usr/bin/ld: cannot find -lgdi
collect2: ld returned 1 exit status
make: *** [OBJ.x86_64-unknown-linux-gnu/_grass6_wxvdigit.so] Error 1

Thanks.

On Thu, Dec 11, 2008 at 11:19 AM, Martin Landa wrote:

> Hi,
>
> 2008/12/11 Jamie Adams :
> > --
> >>> ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-python
> >>> --enable-64bit --with-readline
> >>> --with-readline-includes=/usr/include/readline --with-freetype
> >>> --with-freetype-includes=/usr/include/freetype2/
> >>> --with-wxwidgets=/usr/bin/wx-config --with-postgres
> >>> --with-postgres-includes=/usr/include/postgresql/
>
> --with-cxx is missing...
>
> > /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
> > /usr/local/work/build/grass6_devel/gui/wxpython/nviz
> >>> make
> > make: *** No rule to make target `default', needed by `first'.  Stop.
>
> well, Makefile should be fixed, vdigit and nviz shouldn't be compiled
> when support for cxx/python/wxwidgets is disabled.
>
> Martin
>
> --
> Martin Landa  * 
> http://gama.fsv.cvut.cz/~landa<http://gama.fsv.cvut.cz/%7Elanda>*
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] compile error with vdigit nviz

2008-12-11 Thread Jamie Adams
Hello all,

I've been compiling 6.4 locally for sometime, but ran into a problem after
my last svn update.

Ubuntu 8.04 64-bit
revision 34829
--
>> ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-python
--enable-64bit --with-readline
--with-readline-includes=/usr/include/readline --with-freetype
--with-freetype-includes=/usr/include/freetype2/
--with-wxwidgets=/usr/bin/wx-config --with-postgres
--with-postgres-includes=/usr/include/postgresql/


GRASS GIS compilation log
-
Started compilation: Thu Dec 11 10:10:26 PST 2008
--
Errors in:
/usr/local/work/build/grass6_devel/gui/wxpython/vdigit
/usr/local/work/build/grass6_devel/gui/wxpython/nviz
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Thu Dec 11 10:15:22 PST 2008
make: *** [default] Error 1

>> cd /usr/local/work/build/grass6_devel/gui/wxpython/vdigit
>> make
make: *** No rule to make target `default', needed by `first'.  Stop.
--

The results are the same for nviz.  What's going wrong here?

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

Re: [GRASS-dev] r.resamp.stats bus error

2008-10-21 Thread Jamie Adams
Great.  The command is proceeding normally now.

Thanks!

On Tue, Oct 21, 2008 at 11:34 AM, Markus Neteler <[EMAIL PROTECTED]> wrote:

> On Tue, Oct 21, 2008 at 1:19 PM, Glynn Clements
> <[EMAIL PROTECTED]> wrote:
> > the following change should fix it:
> >
> > --- raster/r.resamp.stats/main.c(revision 33947)
> > +++ raster/r.resamp.stats/main.c(working copy)
> > @@ -315,8 +315,8 @@
> >
> > G_set_window(&src_w);
> >
> > -row_scale = 1 + ceil(dst_w.ns_res / src_w.ns_res);
> > -col_scale = 1 + ceil(dst_w.ew_res / src_w.ew_res);
> > +row_scale = 2 + ceil(dst_w.ns_res / src_w.ns_res);
> > +col_scale = 2 + ceil(dst_w.ew_res / src_w.ew_res);
> >
> > /* allocate buffers for input rows */
> > bufs = G_malloc(row_scale * sizeof(DCELL *));
>
> Backported to 6.4.svn.
>
> Markus
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Re: [GRASS-dev] r.resamp.stats bus error

2008-10-20 Thread Jamie Adams
Here's the output:

This GDB was configured as "x86_64-linux"...
(gdb) run -w input=W080N50 output=temp
Starting program: /usr/local/grass-6.4.svn/bin/r.resamp.stats -w
input=W080N50 output=temp
   0%
Program received signal SIGSEGV, Segmentation fault.
0x7f8c4f2682a8 in transfer_to_cell_id (fd=,
cell=0xa1) at get_row.c:571
571 ((DCELL *) cell)[i] = ((CELL *) G__.work_buf)[i];
(gdb) where
#0  0x7f8c4f2682a8 in transfer_to_cell_id (fd=,
cell=0xa1) at get_row.c:571
#1  0x7f8c4f26899d in get_map_row_nomask (fd=6, rast=0xa1, row=, data_type=) at get_row.c:633
#2  0x7f8c4f269279 in get_map_row (fd=6, rast=0xa1, row=6, data_type=2,
null_is_zero=0, with_mask=1) at get_row.c:646
#3  0x00402256 in main (argc=, argv=) at main.c:192


On Mon, Oct 20, 2008 at 4:03 PM, Glynn Clements <[EMAIL PROTECTED]>wrote:

>
> Jamie Adams wrote:
>
> > I'm running grass 6.4, revision 33922, on Ubuntu 8.04 and keep getting a
> bus
> > error when running r.resamp.stats with the -w flag.  I couldn't find any
> > recent mentions of this type of error in trac, and none regarding
> > r.resamp.stats.  Any ideas?
>
> Nope. Can you get a backtrace from gdb? E.g.:
>
>$ gdb r.resamp.stats
>> run -w input=W080N50 output=temp
>[error message]
>> where
>
> --
> Glynn Clements <[EMAIL PROTECTED]>
>
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

[GRASS-dev] r.resamp.stats bus error

2008-10-20 Thread Jamie Adams
I'm running grass 6.4, revision 33922, on Ubuntu 8.04 and keep getting a bus
error when running r.resamp.stats with the -w flag.  I couldn't find any
recent mentions of this type of error in trac, and none regarding
r.resamp.stats.  Any ideas?
*
> g.region -g*
n=50.0008
s=29.99916667
w=-80.0008
e=-59.99916667
nsres=0.0017
ewres=0.0017
rows=12001
cols=12001
cells=144024001

*> r.info -rstg W080N50*
min=0
max=1
north=50N
south=30N
east=60W
west=80W
nsres=0:00:03
ewres=0:00:03
datatype=CELL

*> r.resamp.stats -w input=W080N50 output=temp*
Bus error
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev