[GRASS-dev] [GRASS GIS] #3010: PyGRASS fails to write vector map with attributes

2016-05-04 Thread GRASS GIS
#3010: PyGRASS fails to write vector map with attributes
--+-
 Reporter:  annakrat  |  Owner:  grass-dev@…
 Type:  defect| Status:  new
 Priority:  major |  Milestone:  7.1.0
Component:  PyGRASS   |Version:  svn-trunk
 Keywords:  vector|CPU:  Unspecified
 Platform:  All   |
--+-
 Example taken from a workshop material:

 {{{
 from grass.pygrass.vector import VectorTopo
 from grass.pygrass.vector.geometry import Point
 point1 = Point(635818.8, 221342.4)
 point2 = Point(633627.7, 227050.2)
 cols = [(u'cat',   'INTEGER PRIMARY KEY'),
 (u'name',  'TEXT')]

 with VectorTopo('my_points', mode='w', tab_cols=cols, overwrite=True) as
 my_points:
 # save the point and the attribute
 my_points.write(point1, ('pub', ))
 my_points.write(point2, ('restaurant', ))
 # save the changes to the database
 my_points.table.conn.commit()
 }}}

 gives:

 {{{
 WARNING: Vector map  already exists and will be overwritten
 WARNING: Coor file of vector map  is larger than it
  should be (18 bytes excess)
 Building topology for vector map ...
 Registering primitives...
 0 primitives registered
 0 vertices registered
 Building areas...
  100%
 0 areas built
 0 isles built
 Attaching islands...
 Attaching centroids...
 Number of nodes: 0
 Number of primitives: 0
 Number of points: 0
 Number of lines: 0
 Number of boundaries: 0
 Number of centroids: 0
 Number of areas: 0
 Number of isles: 0
 Traceback (most recent call last):
   File "", line 3, in 
   File "/home/anna/dev/grass/trunk1/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/errors.py", line 15, in wrapper
 return method(self, *args, **kargs)
   File "/home/anna/dev/grass/trunk1/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/vector/__init__.py", line 197, in write
 cats.set(cat, self.layer)
   File "/home/anna/dev/grass/trunk1/dist.x86_64-pc-linux-
 gnu/etc/python/grass/pygrass/vector/basic.py", line 452, in set
 libvect.Vect_cat_set(self.c_cats, layer, cat)
 ctypes.ArgumentError: argument 3: : wrong
 type
 }}}

 Works in 7.0.4.

--
Ticket URL: 
GRASS GIS 

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

[GRASS-dev] Seeking advices for image segmentation algorithms and windows compile question

2016-05-04 Thread Yang, Bo (yangb2)
Hello,

This is Bo Yang from the University of Cincinnati. I am working with Moritz and 
Markus for the GSoC 2016 project-- Additional segmentation algorithms for 
i.segment [0]. Currently, the i.segment module only provides one segmentation 
algorithm: region-growing. The code of i.segment was structured in a way that 
allows addition of other algorithms. I plan to add

More algorithms such as mean-shift and watershed.  To prepare for it, I 
searched some literatures about both algorithms below, I'd like to consult if 
anyone have more recommended references.



Mean-shift:

Comaniciu, D., & Meer, P. (2002). Mean shift: a robust approach toward feature 
space analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence, 
24(5), 1-37.



Watershed:
Shafarenko, Leila, Maria Petrou, and Josef Kittler. "Automatic watershed 
segmentation of randomly textured color images." Image Processing, IEEE 
Transactions on 6.11 (1997): 1530-1544.
Haris, Kostas, et al. "Hybrid image segmentation using watersheds and fast 
region merging." Image Processing, IEEE Transactions on 7.12 (1998): 1684-1699.


In addition, is there anyone who use win10 OS to compile the GRASS? I have 
compiled GRASS in window 10 64bit system followed the tutorial [1]. In last 
step of the tutorial it mentioned:

>Usage:

>To start GRASS use the icon on the desktop or if you want to 
be able to use the command line from within GRASS.

>Type in cmd console (assuming that we compiled GRASS 7.1):

>c:\osgeo4w\bin\grass71svn.bat

However, No matter I use CMD console or the OSGeo4W Shell. I got the same error 
below:

'""' is not recognized as an internal or external command, 
operable program or batch file.
>From the error.log there is no error during the compiling. There is no error 
>reported in former steps either, and I can see the file " grass71svn.bat " is 
>located in the right place. But I still can't start the compiled GRASS. I 
>Googled this error but can't find helpful information. Any suggestion would be 
>greatly appreciate.

P.S. scripts in grass71svn.bat:
@echo off
rem #
rem #
rem # GRASS initialization bat script (OSGeo4W)
rem #
rem #

SET OSGEO4W_ROOT=@osgeo4w@

rem
rem Set environmental variables
rem
call %OSGEO4W_ROOT%\bin\o4w_env.bat
call %OSGEO4W_ROOT%\apps\grass\grass-7.1.svn\etc\env.bat

rem
rem Launch GRASS GIS
rem
"%GRASS_PYTHON%" "%GISBASE%\etc\grass71.py" %*

rem
rem Pause on error
rem
if %ERRORLEVEL% GEQ 1 pause

[0] https://wiki.osgeo.org/wiki/GRASS_GSoC_2016_Segment_Algorithms
[1] https://trac.osgeo.org/grass/wiki/CompileOnWindows

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

Re: [GRASS-dev] [GRASS GIS] #1049: optional histogram sidebar for legends

2016-05-04 Thread GRASS GIS
#1049: optional histogram sidebar for legends
--+--
  Reporter:  hamish   |  Owner:  grass-dev@…
  Type:  enhancement  | Status:  closed
  Priority:  minor|  Milestone:  7.0.0
 Component:  Display  |Version:  svn-trunk
Resolution:  fixed|   Keywords:  d.legend, ps.map
   CPU:  All  |   Platform:  All
--+--
Changes (by annakrat):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 This seems to be completed.

--
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] [GRASS GIS] #3004: r.volume: ERROR: Reading raster map request for row z is outside region

2016-05-04 Thread GRASS GIS
#3004: r.volume: ERROR: Reading raster map  request for row z is outside
region
-+-
  Reporter:  hellik  |  Owner:  grass-dev@…
  Type:  defect  | Status:  closed
  Priority:  major   |  Milestone:  7.0.4
 Component:  Raster  |Version:  svn-trunk
Resolution:  fixed   |   Keywords:  r.volume
   CPU:  All |   Platform:  All
-+-
Changes (by annakrat):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Backported in 68378.

--
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] Work around for bug causing profiler and histogram to crash in GRASS 7.1 64bit wxPython 3.x

2016-05-04 Thread Michael Barton
Sure. 

Here is a recent stack exchange for this problem. Supposedly it is fixed in 
wxPython 3.0.3.

http://stackoverflow.com/questions/30383786/wxpython-wx-lib-plot-plotcanvas-error

And here is the patch to fix plot.py. 

http://trac.wxwidgets.org/attachment/ticket/16767/wxPython-3.0.2.0-plot.patch

It is pretty minimal effort to make the changes, so I patched my local version 
of plot.py, which is deeply buried on my Mac in:

/usr/local/lib/wxPython-3.0.2.0/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/lib/plot.py
 

Then I recompiled GRASS and rebundled the patched wxPython with the 64bit GRASS 
app. 



This is also posted in https://trac.osgeo.org/grass/ticket/2558 


C. Michael Barton
Director, Center for Social Dynamics & Complexity 
Professor of Anthropology, School of Human Evolution & Social Change
Head, Graduate Faculty in Complex Adaptive Systems Science
Arizona State University

voice:  480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)
fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu















> On May 4, 2016, at 2:31 AM, Moritz Lennert  
> wrote:
> 
> On 03/05/16 02:12, Michael Barton wrote:
>> I've done a work around for the wxPython bug that caused the profile and
>> histogram tools to fail in the experimental 64 bit, wxPython 3 GRASS 7.1
>> binary. If you are trying this, please update and see what else doesn't
>> work.
> 
> Could you tell us what this workaround is ?
> 
> Moritz

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

Re: [GRASS-dev] Work around for bug causing profiler and histogram to crash in GRASS 7.1 64bit wxPython 3.x

2016-05-04 Thread Markus Neteler
(please reduce the number of CC ! otherwise I always have to approve
manually in mailman)

On Wed, May 4, 2016 at 11:31 AM, Moritz Lennert
 wrote:
> On 03/05/16 02:12, Michael Barton wrote:
>>
>> I've done a work around for the wxPython bug that caused the profile and
>> histogram tools to fail in the experimental 64 bit, wxPython 3 GRASS 7.1
>> binary. If you are trying this, please update and see what else doesn't
>> work.
>
>
> Could you tell us what this workaround is ?
>
> Moritz

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

Re: [GRASS-dev] Work around for bug causing profiler and histogram to crash in GRASS 7.1 64bit wxPython 3.x

2016-05-04 Thread Moritz Lennert

On 03/05/16 02:12, Michael Barton wrote:

I've done a work around for the wxPython bug that caused the profile and
histogram tools to fail in the experimental 64 bit, wxPython 3 GRASS 7.1
binary. If you are trying this, please update and see what else doesn't
work.


Could you tell us what this workaround is ?

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

Re: [GRASS-dev] [GRASS GIS] #3004: r.volume: ERROR: Reading raster map request for row z is outside region

2016-05-04 Thread GRASS GIS
#3004: r.volume: ERROR: Reading raster map  request for row z is outside
region
-+-
  Reporter:  hellik  |  Owner:  grass-dev@…
  Type:  defect  | Status:  closed
  Priority:  major   |  Milestone:  7.0.4
 Component:  Raster  |Version:  svn-trunk
Resolution:  fixed   |   Keywords:  r.volume
   CPU:  All |   Platform:  All
-+-

Comment (by hellik):

 Replying to [comment:2 annakrat]:
 > Fixed integer overflow in r68376. Please test.

 Should be backported?

--
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] [GRASS GIS] #3004: r.volume: ERROR: Reading raster map request for row z is outside region

2016-05-04 Thread GRASS GIS
#3004: r.volume: ERROR: Reading raster map  request for row z is outside
region
-+-
  Reporter:  hellik  |  Owner:  grass-dev@…
  Type:  defect  | Status:  closed
  Priority:  major   |  Milestone:  7.0.4
 Component:  Raster  |Version:  svn-trunk
Resolution:  fixed   |   Keywords:  r.volume
   CPU:  All |   Platform:  All
-+-
Changes (by hellik):

 * status:  new => closed
 * resolution:   => fixed


--
Ticket URL: 
GRASS GIS 

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

Re: [GRASS-dev] [GRASS GIS] #3004: r.volume: ERROR: Reading raster map request for row z is outside region

2016-05-04 Thread GRASS GIS
#3004: r.volume: ERROR: Reading raster map  request for row z is outside
region
-+-
  Reporter:  hellik  |  Owner:  grass-dev@…
  Type:  defect  | Status:  new
  Priority:  major   |  Milestone:  7.0.4
 Component:  Raster  |Version:  svn-trunk
Resolution:  |   Keywords:  r.volume
   CPU:  All |   Platform:  All
-+-

Comment (by hellik):

 Replying to [comment:2 annakrat]:
 > Fixed integer overflow in r68376. Please test.

 Fixed,closing ticket.

 Thanks.

--
Ticket URL: 
GRASS GIS 

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