
|
TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Hi, I've just got OpenEV2 running on my Debian Lenny system, but I'm having problems when opening vector files that I can't seem to solve. The problems only occur when opening files through OGR. GDAL/raster and
shapefiles work fine. I'm using a recent SVN checkout of the openev2 sources, and a manually built GDAL 1.6.0. All other dependencies are from Debian repositories. I'm using Python 2.5. To get openev to run at all, I had to make some changes to gvogrdlg.py and
gvviewwindow.py. I'm attaching the diff. In gvogrdlg, Python was complaining about the use of the deprecated "CList" for the layer list. And due to some other error, which I can't remember, I didn't
get any items in the list anyway. So I replaced it with a TreeView, with multi- select instead of the "checkbox" pixmaps. This also made it possible to remove quite a few lines of code for the old layer selection stuff.
In gvviewwindow, file_open_by_name() was trying to open all my vector files with GDAL instead of OGR. I don't know why, as I couldn't really get my head around what the original code really was trying to do. My fix isn't perfect, but it works.
I should mention that I'm entirely novice to python and c/c++, and to OpevEV, GDAL, or any kind of geo/map software for that matter. I'm hoping to learn more about those things by experimenting/playing around with openev. I'm particularly
interested in S-57 (and raster/BSB) nautical chart stuff, and I'm excited to have a look at Sylvain Duclos' S-52 stuff after I've straightened my current problem out. To get openev2 to compile at all, I also had to hack the makefiles a bit.
In the testmain makefile, I added -I$(SYSTEM)/src/lib/gv to the compiler flags. In the gv makefile, I added "-I /usr/include/pygtk-2.0 -I/usr/include/python2.5". And in resources/mklocal/Linux I had to change the Python version from 2.4
to 2.5, and remove the "-levtess" compiler flag. Anyway, over to my real problem now... :) I'm opening, for example, an S-57 file. I'm selecting some layers in the gvogrdlg window. I'm clicking Accept. I'm getting this and nothing more happens:
File "gvviewwindow.py", line 623, in file_open_ogr_by_layer raw_data = _gv.gv_shapes_from_ogr_layer( layer ) TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer I've traced this "layer" guy to gvogrdlg (layer = self.ds.GetLayer( i )). I've looked at
the GetLayer() stuff in the OGR library, which corresponds to "DataSource_GetLayerByIndex" in ogr_wrap.cpp in the OGR sources. A PyObject is returned from there, this PyObject is generated by SWIG_NewPointerObj() in the C++ code.
But when this object is sent to _gv.gv_shapes_from_ogr_layer(), this function is appearantly expecting a string instead. On my google adventures, I've found some mentions of SWIG pointers with a string notation, something like: 0HF534A3_OGRLayerH (which I'm guessing is what the gv
library wants here). The OGR library obviously returns a SWIG pointer, but as a Python object - not as a string...? I've tried all sorts of hacks to OGR, the gv library, and the python code, but to no avail.
We've already went far beyond the boundaries of my python/c++/swig knowledge, so I'd be most grateful if someone could guide me from here. :-) Best regards, Joel Bjurström -- maxxflow@...
http://maxxflow.com
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Seems I forgot that diff I promised you... Here it is! Joel B. -- maxxflow@...http://maxxflow.com
On Mon, Apr 13, 2009 at 11:47 PM, Joel Bjurström <maxxflow@...> wrote:
Hi,
I've just got OpenEV2 running on my Debian Lenny system, but I'm having problems when opening vector files that I can't seem to solve. The problems only occur when opening files through OGR. GDAL/raster and
shapefiles work fine.
I'm using a recent SVN checkout of the openev2 sources, and a manually built GDAL 1.6.0. All other dependencies are from Debian repositories. I'm using Python 2.5.
To get openev to run at all, I had to make some changes to gvogrdlg.py and
gvviewwindow.py. I'm attaching the diff. In gvogrdlg, Python was complaining about the use of the deprecated "CList" for the layer list. And due to some other error, which I can't remember, I didn't
get any items in the list anyway. So I replaced it with a TreeView, with multi- select instead of the "checkbox" pixmaps. This also made it possible to remove quite a few lines of code for the old layer selection stuff.
In gvviewwindow, file_open_by_name() was trying to open all my vector files with GDAL instead of OGR. I don't know why, as I couldn't really get my head around what the original code really was trying to do. My fix isn't perfect, but it works.
I should mention that I'm entirely novice to python and c/c++, and to OpevEV, GDAL, or any kind of geo/map software for that matter. I'm hoping to learn more about those things by experimenting/playing around with openev. I'm particularly
interested in S-57 (and raster/BSB) nautical chart stuff, and I'm excited to have a look at Sylvain Duclos' S-52 stuff after I've straightened my current problem out.
To get openev2 to compile at all, I also had to hack the makefiles a bit.
In the testmain makefile, I added -I$(SYSTEM)/src/lib/gv to the compiler flags. In the gv makefile, I added "-I /usr/include/pygtk-2.0 -I/usr/include/python2.5". And in resources/mklocal/Linux I had to change the Python version from 2.4
to 2.5, and remove the "-levtess" compiler flag.
Anyway, over to my real problem now... :)
I'm opening, for example, an S-57 file. I'm selecting some layers in the gvogrdlg window. I'm clicking Accept. I'm getting this and nothing more happens:
File "gvviewwindow.py", line 623, in file_open_ogr_by_layer raw_data = _gv.gv_shapes_from_ogr_layer( layer ) TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
I've traced this "layer" guy to gvogrdlg (layer = self.ds.GetLayer( i )). I've looked at
the GetLayer() stuff in the OGR library, which corresponds to "DataSource_GetLayerByIndex" in ogr_wrap.cpp in the OGR sources. A PyObject is returned from there, this PyObject is generated by SWIG_NewPointerObj() in the C++ code.
But when this object is sent to _gv.gv_shapes_from_ogr_layer(), this function is appearantly expecting a string instead. On my google adventures, I've found some mentions of SWIG pointers with a string notation, something like: 0HF534A3_OGRLayerH (which I'm guessing is what the gv
library wants here). The OGR library obviously returns a SWIG pointer, but as a Python object - not as a string...? I've tried all sorts of hacks to OGR, the gv library, and the python code, but to no avail.
We've already went far beyond the boundaries of my python/c++/swig knowledge, so I'd be most grateful if someone could guide me from here. :-)
Best regards, Joel Bjurström
-- maxxflow@...
http://maxxflow.com
[openev2-fixes-2009-04-13-maxxflow.diff] diff -aur openev2-orig/src/pymod/gvogrdlg.py openev2/src/pymod/gvogrdlg.py
--- openev2-orig/src/pymod/gvogrdlg.py 2008-12-19 03:56:30.000000000 +0100
+++ openev2/src/pymod/gvogrdlg.py 2009-04-13 20:37:05.000000000 +0200
@@ -35,7 +35,7 @@
def __init__(self, ds, viewwindow):
gtk.Window.__init__(self)
self.set_title('Vector Layer Selection')
- self.set_size_request(500, 500)
+ self.set_size_request(350, 600)
self.set_border_width(3)
self.set_resizable(True)
self.connect('delete-event',self.close)
@@ -44,17 +44,15 @@
gvhtml.set_help_topic(self, "veclayerselect.html" );
# Layer list
+
layerbox = gtk.ScrolledWindow()
shell.pack_start(layerbox)
- layerlist = gtk.CList(cols=2)
-
+ layerstore = gtk.ListStore(str)
+ layerlist = gtk.TreeView(layerstore)
+ column = gtk.TreeViewColumn('Layer', gtk.CellRendererText(), text=0)
+ layerlist.append_column(column)
+ layerlist.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
layerbox.add_with_viewport(layerlist)
- layerlist.set_shadow_type(gtk.SHADOW_NONE)
- layerlist.set_selection_mode(gtk.SELECTION_SINGLE)
- layerlist.set_row_height(30)
- layerlist.set_column_width(0, 24)
- #layerlist.connect('select-row', self.layer_selected)
- layerlist.connect('button-press-event', self.list_clicked)
# Clip to view?
@@ -80,7 +78,7 @@
# buttons
button_box = gtk.HButtonBox()
- button_box.set_layout_default(gtk.BUTTONBOX_START)
+ button_box.set_layout(gtk.BUTTONBOX_START)
ok_button = gtk.Button('Accept')
ok_button.connect('clicked', self.accept)
loadall_button = gtk.Button('Load All')
@@ -95,25 +93,17 @@
button_box.pack_start(help_button, expand=False)
shell.pack_start(button_box,expand=False)
- self.connect('realize', self.realize)
- self.sel_pixmap = gtk.Image().set_from_file(os.path.join(gview.home_dir,'pics',
- 'ck_on_l.xpm'))
- self.not_sel_pixmap = gtk.Image().set_from_file( os.path.join(gview.home_dir,'pics',
- 'ck_off_l.xpm'))
-
shell.show_all()
self.ds = ds
self.viewwindow = viewwindow
+ self.layerstore = layerstore
self.layerlist = layerlist
layer_count = ds.GetLayerCount()
- self.layer_names = []
- self.layer_sel = []
for i in range(layer_count):
layer = ds.GetLayer( i )
- self.layer_names.append( layer.GetName() )
- self.layer_sel.append( 0 )
+ layerstore.append([ '%s' % layer.GetName() ])
self.show_all()
@@ -141,57 +131,22 @@
else:
rect = None
- for i in range(len(self.layer_sel)):
- if self.layer_sel[i]:
- layer = self.ds.GetLayer( i )
+ for i in range(self.layerlist.get_selection().count_selected_rows()):
+ layer = self.ds.GetLayer( i )
- if rect is not None:
- layer.SetSpatialFilter( rect )
+ if rect is not None:
+ layer.SetSpatialFilter( rect )
- self.viewwindow.file_open_ogr_by_layer( layer )
+ self.viewwindow.file_open_ogr_by_layer( layer )
- if rect is not None:
- layer.SetSpatialFilter( None )
+ if rect is not None:
+ layer.SetSpatialFilter( None )
if rect is not None:
rect.Destroy()
self.close()
- def realize(self, widget):
- lst = self.layerlist
-
- lst.freeze()
- lst.clear()
-
- i = 0
- for entry in self.layer_names:
- lst.append(('', entry))
-
- lst.set_pixmap(i, 0, self.not_sel_pixmap)
-
- i = i + 1
-
- lst.thaw()
-
- def list_clicked(self, lst, event):
- row, col = lst.get_selection_info(int(event.x), int(event.y))
- lst.emit_stop_by_name('button-press-event')
-
- if event.type is gtk.gdk._2BUTTON_PRESS:
- for i in range(len(self.layer_sel)):
- self.layer_sel[i] = 0
-
- self.layer_sel[row] = 1
- self.accept()
- else:
- self.layer_sel[row] = not self.layer_sel[row]
-
- if self.layer_sel[row]:
- lst.set_pixmap(row, 0, self.sel_pixmap)
- else:
- lst.set_pixmap(row, 0, self.not_sel_pixmap)
-
def execute_sql(self, *args):
statement = self.sql_cmd.get_text()
diff -aur openev2-orig/src/pymod/gvviewwindow.py openev2/src/pymod/gvviewwindow.py
--- openev2-orig/src/pymod/gvviewwindow.py 2009-04-13 20:48:07.000000000 +0200
+++ openev2/src/pymod/gvviewwindow.py 2009-04-13 20:47:08.000000000 +0200
@@ -908,27 +908,13 @@
self.app.load_project(filename)
return
+ if self.file_open_ogr_by_name(filename):
+ return
+
dataset = gview.manager.get_dataset(filename)
if dataset is None:
- err = gdal.GetLastErrorNo()
- if err not in (0,4):
- show_error(filename)
- return
-
- # catch ogr file open failure and pop up
- # a warning rather than dumping to screen.
- try:
- if dataset is None and self.file_open_ogr_by_name(filename):
- show_error(filename)
- return
-
- if dataset is None:
- show_error(filename)
- return
- except:
- if dataset is None:
- show_error(filename)
- return
+ show_error(filename)
+ return
self.open_gdal_dataset(dataset, lut, sds_check, add_to_rfl=1)
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Hi Joel,
On Mon, Apr 13, 2009 at 5:47 PM, Joel Bjurström < maxxflow@...> wrote:
>
> To get openev to run at all, I had to make some changes to gvogrdlg.py and
> gvviewwindow.py. I'm attaching the diff.
Unfortunately for you, gvogrdlg.py is one of the few modules I barely
touched... so it hasn't been tested at all. In fact, most of the OGR
stuff hasn't either. But I'm not sure what you mean by "To get openev
to run at all".
> In gvogrdlg, Python was complaining about the use of the deprecated "CList"
> for the layer list. And due to some other error, which I can't remember, I didn't
> get any items in the list anyway. So I replaced it with a TreeView,
Or you could have used pgu.CList, which is a TreeView mimicking a CList.
> In gvviewwindow, file_open_by_name() was trying to open all my vector files
> with GDAL instead of OGR. I don't know why,
Again, this was not tested...
> To get openev2 to compile at all, I also had to hack the makefiles a bit.
> In the testmain makefile, I added -I$(SYSTEM)/src/lib/gv to the compiler
> flags.
> In the gv makefile, I added "-I /usr/include/pygtk-2.0
> -I/usr/include/python2.5".
> And in resources/mklocal/Linux I had to change the Python version from 2.4
> to 2.5, and remove the "-levtess" compiler flag.
You could have saved yourself a lot of troubles if you had simply ran
the setup.py script... it would have built the _gv extension and would
have installed the package.
> I'm opening, for example, an S-57 file. I'm selecting some layers in the
> gvogrdlg window. I'm clicking Accept. I'm getting this and nothing more happens:
>
> File "gvviewwindow.py", line 623, in file_open_ogr_by_layer
> raw_data = _gv.gv_shapes_from_ogr_layer( layer )
> TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Yet more OGR stuff I didn't touch...
> I've looked at
> the GetLayer() stuff in the OGR library, which corresponds to
> "DataSource_GetLayerByIndex"
> in ogr_wrap.cpp in the OGR sources. A PyObject is returned from there,
> this PyObject is generated by SWIG_NewPointerObj() in the C++ code.
You need to look at the gv_shapes_from_ogr_layer() wrapper in
gv.override, line 1360.
That's where the magic has to happen ;)
> On my google adventures, I've found some mentions of SWIG pointers with a
> string notation, something like: 0HF534A3_OGRLayerH (which I'm guessing is what the
> gv library wants here).
Yes, that was the old way using the old GDAL python wrappers. Until
recently, OpenEV could not use the GDAL ng-python. I had to come up
with some trickery to make this work but only for rasters. Look at the
GvManager class in gview.py and the _wrap_gv_manager_* functions in
gv.override for some tips on how it's done.
> We've already went far beyond the boundaries of my python/c++/swig
> knowledge, so I'd be most grateful if someone could guide me from here. :-)
I will try to help you as much as I can but you need to be patient
because my day job comes first :)
cheers
--
Mario B.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Hi Joel & Mario,
I'm probably to blame for bringing the Makefile to build GV in OpenEV2.
Since Joel say he is new to this. It would like to emphasize that
setup.py is the real deal for building OpenEV2.
But since you want to do S52 rendering you will need to configure the build. I see 3 ways
A) edit openev2/build/src/lib/gv/Makefile
B) Using "configure" in openev2/build/src/lib/gv (try
"./configure --help" frist) to create a new Makefile overwriting
the one for OpenEV2 (so make a backup)
C) Otherwise edit setup.py to compile GV.
The end result is to have the flags
GV_USE_RENDER_PLUGIN and GV_USE_DOUBLE_PRECISION_COORD set.
The build through setup.py (C) is really nice. This is the way to go
for modern platform neutral building.
If your going for S52 rendering then build testmain also in
openev2/build/src/cc.
This create openev2/build/src/cc/testmain/obj/Linux/testmain on my
system.
Running this like so:
$ ./testmain -ogr=<S-57 file>
This 'testmain' is a test harness for libgv.so. It's a graphical data
dump more or less.
You can e-mail me directly for S52 specific.
Sylvain.
--- On Wed, 4/15/09, Mario Beauchamp < starged@...> wrote:
> From: Mario Beauchamp < starged@...>
> Subject: Re: [Openev-discuss] TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
> To: "Joel Bjurström" < maxxflow@...>
> Cc: openev-discuss@...
> Received: Wednesday, April 15, 2009, 5:10 AM
> Hi Joel,
>
> On Mon, Apr 13, 2009 at 5:47 PM, Joel Bjurström < maxxflow@...>
> wrote:
> >
> > To get openev to run at all, I had to make some
> changes to gvogrdlg.py and
> > gvviewwindow.py. I'm attaching the diff.
>
> Unfortunately for you, gvogrdlg.py is one of the few
> modules I barely
> touched... so it hasn't been tested at all. In fact, most
> of the OGR
> stuff hasn't either. But I'm not sure what you mean by "To
> get openev
> to run at all".
>
> > In gvogrdlg, Python was complaining about the use of
> the deprecated "CList"
> > for the layer list. And due to some other error, which
> I can't remember, I didn't
> > get any items in the list anyway. So I replaced it
> with a TreeView,
>
> Or you could have used pgu.CList, which is a TreeView
> mimicking a CList.
>
> > In gvviewwindow, file_open_by_name() was trying to
> open all my vector files
> > with GDAL instead of OGR. I don't know why,
>
> Again, this was not tested...
>
> > To get openev2 to compile at all, I also had to hack
> the makefiles a bit.
> > In the testmain makefile, I added
> -I$(SYSTEM)/src/lib/gv to the compiler
> > flags.
> > In the gv makefile, I added "-I
> /usr/include/pygtk-2.0
> > -I/usr/include/python2.5".
> > And in resources/mklocal/Linux I had to change the
> Python version from 2.4
> > to 2.5, and remove the "-levtess" compiler flag.
>
> You could have saved yourself a lot of troubles if you had
> simply ran
> the setup.py script... it would have built the _gv
> extension and would
> have installed the package.
>
> > I'm opening, for example, an S-57 file. I'm selecting
> some layers in the
> > gvogrdlg window. I'm clicking Accept. I'm getting this
> and nothing more happens:
> >
> > File "gvviewwindow.py", line 623, in
> file_open_ogr_by_layer
> > raw_data = _gv.gv_shapes_from_ogr_layer( layer
> )
> > TypeError: GvShapes.from_ogr_layer() argument 1 must
> be string, not Layer
>
> Yet more OGR stuff I didn't touch...
>
> > I've looked at
> > the GetLayer() stuff in the OGR library, which
> corresponds to
> > "DataSource_GetLayerByIndex"
> > in ogr_wrap.cpp in the OGR sources. A PyObject is
> returned from there,
> > this PyObject is generated by SWIG_NewPointerObj() in
> the C++ code.
>
> You need to look at the gv_shapes_from_ogr_layer() wrapper
> in
> gv.override, line 1360.
> That's where the magic has to happen ;)
>
> > On my google adventures, I've found some mentions of
> SWIG pointers with a
> > string notation, something like: 0HF534A3_OGRLayerH
> (which I'm guessing is what the
> > gv library wants here).
>
> Yes, that was the old way using the old GDAL python
> wrappers. Until
> recently, OpenEV could not use the GDAL ng-python. I had to
> come up
> with some trickery to make this work but only for rasters.
> Look at the
> GvManager class in gview.py and the _wrap_gv_manager_*
> functions in
> gv.override for some tips on how it's done.
>
> > We've already went far beyond the boundaries of my
> python/c++/swig
> > knowledge, so I'd be most grateful if someone could
> guide me from here. :-)
>
> I will try to help you as much as I can but you need to be
> patient
> because my day job comes first :)
>
> cheers
> --
> Mario B.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> High Quality Requirements in a Collaborative Environment.
> Download a free trial of Rational Requirements Composer
> Now!
> http://p.sf.net/sfu/www-ibm-com> _______________________________________________
> Openev-discuss mailing list
> Openev-discuss@...
> https://lists.sourceforge.net/lists/listinfo/openev-discuss>
__________________________________________________________________
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Salut Sylvain,
On Wed, Apr 15, 2009 at 12:41 PM, s duclos < sylvain_duclos@...> wrote:
>
> Hi Joel & Mario,
>
> I'm probably to blame for bringing the Makefile to build GV in OpenEV2.
Je te pardonne (I forgive him) ;)
> Since Joel say he is new to this. It would like to emphasize that
> setup.py is the real deal for building OpenEV2.
Yes, it is the recommended way. I thought I mentioned it here before
but obviously, I forgot about newcomers...
> C) Otherwise edit setup.py to compile GV.
>
> The end result is to have the flags
> GV_USE_RENDER_PLUGIN and GV_USE_DOUBLE_PRECISION_COORD set.
Ah! I knew I forgot something!! If I remember correctly from way way
back, the GV_USE_DOUBLE_PRECISION_COORD flag was also needed for
general use.
These can easily be added to the setup.py script.
Thanks for your input Sylvain!
cheers
--
Mario B.
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Hi Mario and Sylvain, > Unfortunately for you, gvogrdlg.py is one of the few modules I barely
> touched... so it hasn't been tested at all. In fact, most of the OGR
> stuff hasn't either. But I'm not sure what you mean by "To get openev
> to run at all". I'm sorry, I confused it with the makefile hacks that I did. The python hacks were only for getting past the first problems with opening OGR files (trying to open with GDAL, layer list not working, ..).
> You could have saved yourself a lot of troubles if you had
> simply ran the setup.py script... it would have built the _gv
> extension and would have installed the package. I just tried to follow BUILD_INSTRUCTIONS.txt, without realizing that it was a bit out of date. :) Thank you Sylvain as well for emphasizing this. > Yes, that was the old way using the old GDAL python wrappers.
> Until recently, OpenEV could not use the GDAL ng-python. I had to
> come up with some trickery to make this work but only for rasters.
> Look at the GvManager class in gview.py and the _wrap_gv_manager_*
> functions in gv.override for some tips on how it's done. I added the following to gvviewwindow.py, after looking at GvManager: def get_swig_layer(self, layer): return '_%s_OGRLayerH' % hex(layer.this)
I saw that layer.this was actually of the type "OGRLayerShadow", but from what I can tell that's just an alias for OGRLayerH, so this should work, right? Then I replaced the _gv call (line 623):
raw_data = _gv_shapes_from_ogr_layer( layer ) with: raw_data = _gv_shapes_from_ogr_layer( self.get_swig_layer(layer) ) When the code runs, I get nothing but a segfault. I find out that it's the if statement:
if len(shape_data) > 0: in file_open_ogr_by_layer(), that fails. The "raw_data" returned from the _gv call identifies like this: <_gv.Shapes object at 0x9782824 (GvShapes at 0x9c7bad8)>
"raw_data" is then run through gview.GvShapes to create "shape_data": <GvShapes object at 0x97027d4 (uninitialized at 0x0)> That doesn't look quite right to me. > You need to look at the gv_shapes_from_ogr_layer() wrapper
> in gv.override, line 1360.
> That's where the magic has to happen ;) Yes, I've been there before. :) I've also looked at the _wrap_gv_manager_* functions for ideas. There doesn't seem to be an immediate problem here, from what I can tell...?
_wrap_gv_shapes_from_ogr_layer() (or SWIG_SimpleGetPtr()) seems happy to accept my new swig string pointer, and it returns something back to gvviewwindow.py without complaining. In _wrap_gv_manager*, I see that you're
sometimes returning swig string pointers as well, but that's not applicable here, right? The return value generated by pygobject_new() I suppose is right? Sylvain: I've only got tests/s52gtk2 running as of now, but it looks very promising!
I'll work some more on getting the gv2 version to work before overwhelming you with
questions. ;) I very much appreciate the work you've all put into this piece of software, and for your help with my issues. I hope to be able to contribute some OGR/S-57/S-52 code once I've gotten this to work and learnt more about it.
Keep up the good work! Joel B.
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Hi Joel,
On Mon, Apr 20, 2009 at 5:56 PM, Joel Bjurström < maxxflow@...> wrote:
>
> When the code runs, I get nothing but a segfault. I find out that it's the
> if statement:
> if len(shape_data) > 0:
> in file_open_ogr_by_layer(), that fails.
> The "raw_data" returned from the _gv call identifies like this:
> <_gv.Shapes object at 0x9782824 (GvShapes at 0x9c7bad8)>
> "raw_data" is then run through gview.GvShapes to create "shape_data":
> <GvShapes object at 0x97027d4 (uninitialized at 0x0)>
> That doesn't look quite right to me.
No, it's not right... my fault... apply attached patch, rebuild and
let me know if it works.
cheers
--
Mario B.
[openev2-fixes-2009-04-23.diff] diff -aur openev2-orig/src/lib/gv/gv_pwrap.c openev2/src/lib/gv/gv_pwrap.c
--- openev2-orig/src/lib/gv/gv_pwrap.c 2009-02-03 18:46:43.000000000 -0400
+++ openev2/src/lib/gv/gv_pwrap.c 2009-04-23 12:33:55.000000000 -0400
@@ -3842,11 +3842,14 @@
static int
_wrap_gv_shapes_new(PyGObject *self, PyObject *args, PyObject *kwargs)
{
- static char* kwlist[] = { "shapefilename", NULL };
- char *filename;
+ PyGObject *py_shapes = NULL;
+ static char* kwlist[] = { "shapefilename", "_obj", NULL };
+ char *filename = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|z:_gv.Shapes.__init__",
- kwlist, &filename))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zO!:_gv.Shapes.__init__",
+ kwlist, &filename,
+ &PyGvShapes_Type, &py_shapes
+ ))
return -1;
pygobject_constructv(self, 0, NULL);
@@ -3854,8 +3857,16 @@
PyErr_SetString(PyExc_RuntimeError, "could not create _gv.Shapes object");
return -1;
}
- if (filename != NULL)
+
+ if (filename != NULL) {
gv_shapes_read_from_file(filename, GV_SHAPES (self->obj));
+ }
+ else if( py_shapes != NULL )
+ {
+ // we need to unref here otherwise it will remain a floating GvShapes...
+ g_object_unref(self->obj);
+ self->obj = py_shapes->obj;
+ }
return 0;
}
diff -aur openev2-orig/src/pymod/gview.py openev2/src/pymod/gview.py
--- openev2-orig/src/pymod/gview.py 2008-12-18 22:15:32.000000000 -0400
+++ openev2/src/pymod/gview.py 2009-04-23 13:56:19.000000000 -0400
@@ -1168,7 +1168,7 @@
if _obj is None:
_gv.Shapes.__init__(self, shapefilename)
else:
- _gv.Shapes.__init__(_obj, None)
+ _gv.Shapes.__init__(self, _obj=_obj)
if name:
self.set_name(name)
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Hi Mario and Sylvain! I'm sorry for the delay, it's been a busy time in school. I've found a little time for our matters lately though. After applying your patch, Mario, as well as straightening out a bug in my "fixed" layer selection list,
I got it working. OGR files now open beautifully! (Well, there are a few bugs left. The layer list for example seems to get messed up sometimes when loading many layers simultaneously.) I'm attaching my new patch for the layer dialog stuff - when applied together with your patch, OGR import works.
I've also had a look (although a very small one) at the S52 plugin. That's the context of my second patch, which addresses a few things I had to fix in the makefiles to build libgv.so and testmain. I've just replaced a
python version constant with an automatic check, and added include/library paths to facilitate building testmain without installing libgv.so system-wide. Concerning the S52 plugin, I've got the s52gtk2 test app running, but nothing more. I had to fix a few things,
mostly in the makefile, to make it compile. I'm attaching the diff for the record, though most of the makefile stuff only applies to me, and should be replaced with something more general. One important thing though was the
52_MARparamName[] definition in S52.h. This made the linker complain, because S52.h was included in two independantly compiled .c files (got a "multiple definition" error). So I moved the definition to S52.c, just leaving
a declaration in the header file. I'm not sure if my solution was any good, I'm still feeling a bit lost in the land of C... ;) There was also an issue of a disabled 'nCollection' variable, but you'll see for yourself in the diff...
When I try to use the plugin with testmain, I first get this line once for every loaded layer: S52.c:470: S52_loadLayer(): ERROR: layername / ogrlayer / _cellList --> NULL I found out that it was _cellList that he's complaining about, because _addCell() (where _cellList is set) never gets called.
I couldn't figure out where/how/if that should be done. Then I get a lot of this thing: S52.c:777: S52_draw(): WARNING: no cell loaded Appearently the same thing here. _cellList == NULL.
I'm also attaching a proposal for an INSTALL document for OpenEV2 to replace the aged BUILD_INSTRUCTIONS.TXT I might have missed something. Well, feel free to use it if you like...! Thanks a lot!
/ Joel B. On Thu, Apr 23, 2009 at 9:09 PM, Mario Beauchamp <starged@...> wrote:
Hi Joel,
On Mon, Apr 20, 2009 at 5:56 PM, Joel Bjurström < maxxflow@...> wrote:
>
> When the code runs, I get nothing but a segfault. I find out that it's the
> if statement:
> if len(shape_data) > 0:
> in file_open_ogr_by_layer(), that fails.
> The "raw_data" returned from the _gv call identifies like this:
> <_gv.Shapes object at 0x9782824 (GvShapes at 0x9c7bad8)>
> "raw_data" is then run through gview.GvShapes to create "shape_data":
> <GvShapes object at 0x97027d4 (uninitialized at 0x0)>
> That doesn't look quite right to me.
No, it's not right... my fault... apply attached patch, rebuild and
let me know if it works.
cheers
--
Mario B.
[openev2-fixes-ogr-2009-05-26-maxxflow.diff] diff -aur openev2-orig/src/pymod/gvogrdlg.py openev2/src/pymod/gvogrdlg.py
--- openev2-orig/src/pymod/gvogrdlg.py 2008-12-19 03:56:30.000000000 +0100
+++ openev2/src/pymod/gvogrdlg.py 2009-05-26 06:58:05.000000000 +0200
@@ -35,7 +35,7 @@
def __init__(self, ds, viewwindow):
gtk.Window.__init__(self)
self.set_title('Vector Layer Selection')
- self.set_size_request(500, 500)
+ self.set_size_request(350, 600)
self.set_border_width(3)
self.set_resizable(True)
self.connect('delete-event',self.close)
@@ -44,17 +44,15 @@
gvhtml.set_help_topic(self, "veclayerselect.html" );
# Layer list
+
layerbox = gtk.ScrolledWindow()
shell.pack_start(layerbox)
- layerlist = gtk.CList(cols=2)
-
+ layerstore = gtk.ListStore(str)
+ layerlist = gtk.TreeView(layerstore)
+ column = gtk.TreeViewColumn('Layer', gtk.CellRendererText(), text=0)
+ layerlist.append_column(column)
+ layerlist.get_selection().set_mode(gtk.SELECTION_MULTIPLE)
layerbox.add_with_viewport(layerlist)
- layerlist.set_shadow_type(gtk.SHADOW_NONE)
- layerlist.set_selection_mode(gtk.SELECTION_SINGLE)
- layerlist.set_row_height(30)
- layerlist.set_column_width(0, 24)
- #layerlist.connect('select-row', self.layer_selected)
- layerlist.connect('button-press-event', self.list_clicked)
# Clip to view?
@@ -80,7 +78,7 @@
# buttons
button_box = gtk.HButtonBox()
- button_box.set_layout_default(gtk.BUTTONBOX_START)
+ button_box.set_layout(gtk.BUTTONBOX_START)
ok_button = gtk.Button('Accept')
ok_button.connect('clicked', self.accept)
loadall_button = gtk.Button('Load All')
@@ -95,25 +93,17 @@
button_box.pack_start(help_button, expand=False)
shell.pack_start(button_box,expand=False)
- self.connect('realize', self.realize)
- self.sel_pixmap = gtk.Image().set_from_file(os.path.join(gview.home_dir,'pics',
- 'ck_on_l.xpm'))
- self.not_sel_pixmap = gtk.Image().set_from_file( os.path.join(gview.home_dir,'pics',
- 'ck_off_l.xpm'))
-
shell.show_all()
self.ds = ds
self.viewwindow = viewwindow
+ self.layerstore = layerstore
self.layerlist = layerlist
layer_count = ds.GetLayerCount()
- self.layer_names = []
- self.layer_sel = []
for i in range(layer_count):
layer = ds.GetLayer( i )
- self.layer_names.append( layer.GetName() )
- self.layer_sel.append( 0 )
+ layerstore.append([ '%s' % layer.GetName() ])
self.show_all()
@@ -141,57 +131,22 @@
else:
rect = None
- for i in range(len(self.layer_sel)):
- if self.layer_sel[i]:
- layer = self.ds.GetLayer( i )
+ for i in self.layerlist.get_selection().get_selected_rows()[1]:
+ layer = self.ds.GetLayer( i[0] )
- if rect is not None:
- layer.SetSpatialFilter( rect )
+ if rect is not None:
+ layer.SetSpatialFilter( rect )
- self.viewwindow.file_open_ogr_by_layer( layer )
+ self.viewwindow.file_open_ogr_by_layer( layer )
- if rect is not None:
- layer.SetSpatialFilter( None )
+ if rect is not None:
+ layer.SetSpatialFilter( None )
if rect is not None:
rect.Destroy()
self.close()
- def realize(self, widget):
- lst = self.layerlist
-
- lst.freeze()
- lst.clear()
-
- i = 0
- for entry in self.layer_names:
- lst.append(('', entry))
-
- lst.set_pixmap(i, 0, self.not_sel_pixmap)
-
- i = i + 1
-
- lst.thaw()
-
- def list_clicked(self, lst, event):
- row, col = lst.get_selection_info(int(event.x), int(event.y))
- lst.emit_stop_by_name('button-press-event')
-
- if event.type is gtk.gdk._2BUTTON_PRESS:
- for i in range(len(self.layer_sel)):
- self.layer_sel[i] = 0
-
- self.layer_sel[row] = 1
- self.accept()
- else:
- self.layer_sel[row] = not self.layer_sel[row]
-
- if self.layer_sel[row]:
- lst.set_pixmap(row, 0, self.sel_pixmap)
- else:
- lst.set_pixmap(row, 0, self.not_sel_pixmap)
-
def execute_sql(self, *args):
statement = self.sql_cmd.get_text()
diff -aur openev2-orig/src/pymod/gvviewwindow.py openev2/src/pymod/gvviewwindow.py
--- openev2-orig/src/pymod/gvviewwindow.py 2009-05-26 07:03:37.000000000 +0200
+++ openev2/src/pymod/gvviewwindow.py 2009-05-26 06:57:32.000000000 +0200
@@ -612,7 +612,10 @@
self.app.add_to_rfl(filename)
- GvOGRDlg(hDS, self)
+ if hDS.GetLayerCount() == 1:
+ self.file_open_ogr_by_layer(hDS.GetLayer(0))
+ else:
+ GvOGRDlg(hDS, self)
return True
@@ -620,7 +623,7 @@
import _gv
- raw_data = _gv.gv_shapes_from_ogr_layer( layer )
+ raw_data = _gv.gv_shapes_from_ogr_layer( '_%s_OGRLayerH' % hex(layer.this) )
if raw_data is None:
return False
@@ -908,27 +911,13 @@
self.app.load_project(filename)
return
+ if self.file_open_ogr_by_name(filename):
+ return
+
dataset = gview.manager.get_dataset(filename)
if dataset is None:
- err = gdal.GetLastErrorNo()
- if err not in (0,4):
- show_error(filename)
- return
-
- # catch ogr file open failure and pop up
- # a warning rather than dumping to screen.
- try:
- if dataset is None and self.file_open_ogr_by_name(filename):
- show_error(filename)
- return
-
- if dataset is None:
- show_error(filename)
- return
- except:
- if dataset is None:
- show_error(filename)
- return
+ show_error(filename)
+ return
self.open_gdal_dataset(dataset, lut, sds_check, add_to_rfl=1)
[openev2-fixes-makefiles-2009-05-26-maxxflow.diff] diff -aur openev2-orig/resource/mklocal/Linux openev2/resource/mklocal/Linux
--- openev2-orig/resource/mklocal/Linux 2007-01-03 22:39:56.000000000 +0100
+++ openev2/resource/mklocal/Linux 2009-05-26 09:29:30.000000000 +0200
@@ -74,7 +74,7 @@
# print distutils.sysconfig.get_python_inc()"`
#PYTHON_VER = `python -c "import sys;print sys.version[0]+sys.version[2]"`
- PYTHON_VER = 2.4
+ PYTHON_VER = `python -V 2>&1 | sed -r 's|.* (.\..)\..|\1|'`
PYTHON_ROOT = ${INSTALL_PREFIX}
PYGTK = $(PYTHON_ROOT)/share/pygtk
PYGTK_VER = 2.0
@@ -105,7 +105,7 @@
GL_INCS =
GL_LIBSL =
- GL_LIBS = -levtess -lGLU -lGL
+ GL_LIBS = -lGLU -lGL
#
# Tie it all together
diff -aur openev2-orig/src/cc/testmain/Makefile openev2/src/cc/testmain/Makefile
--- openev2-orig/src/cc/testmain/Makefile 2007-01-03 22:39:56.000000000 +0100
+++ openev2/src/cc/testmain/Makefile 2009-05-26 09:32:28.000000000 +0200
@@ -45,7 +45,7 @@
# Locations of needed header files
#
- INCLUDES += -I$(SYSTEM)/resource
+ INCLUDES += -I$(SYSTEM)/resource -I$(SYSTEM)/src/lib/gv
INCLUDES += $(EV_INCS)
#
@@ -53,7 +53,7 @@
# INSTLIBS depends on ARCHLIBS depends on POSTLIBS
#
- LDFLAGS += $(EV_LIBSL)
+ LDFLAGS += $(EV_LIBSL) -L$(SYSTEM)/src/lib/gv
INSTLIBS += -lgv $(EV_LIBS)
diff -aur openev2-orig/src/lib/gv/Makefile openev2/src/lib/gv/Makefile
--- openev2-orig/src/lib/gv/Makefile 2007-04-29 03:15:38.000000000 +0200
+++ openev2/src/lib/gv/Makefile 2009-05-26 09:27:23.000000000 +0200
@@ -158,7 +158,7 @@
# Locations of needed header files
#
- INCLUDES += -I$(SYSTEM)/resource
+ INCLUDES += -I$(SYSTEM)/resource -I/usr/include/pygtk-2.0 `python-config --includes`
INCLUDES += $(EV_INCS)
#
# Libraries to use in library dependency order
[S52-buildproblems-2009-05-27.diff] diff -aur S52-orig/Makefile S52/Makefile
--- S52-orig/Makefile 2009-05-20 22:09:42.000000000 +0200
+++ S52/Makefile 2009-05-27 21:08:11.000000000 +0200
@@ -27,7 +27,15 @@
DBG3 = -O0 -g3 -Wall -DDEBUG
DBG = $(DBG3)
-CC = gcc -std=c99 -fPIC
+CC = gcc -std=c99 -fPIC \
+ -I../openev2/src/lib/gv \
+ -I/usr/include/gtk-2.0 \
+ -I/usr/include/cairo \
+ -I/usr/include/atk-1.0 \
+ -I/usr/include/pango-1.0 \
+ -I/usr/include/gtkglext-1.0 \
+ -I/usr/lib/gtk-2.0/include \
+ -I/usr/lib/gtkglext-1.0/include
# win32: check this
s52win32 : MINGW = /usr/bin/i586-mingw32msvc-
@@ -42,7 +50,7 @@
OBJS_GV = gvS57layer.o S57gv.o
OPENEV_HOME = `pwd -P`/../../openev
-OPENEV2_HOME = `pwd -P`/../../../openev2/trunk/src/lib/gv
+OPENEV2_HOME = `pwd -P`/../openev2/src/lib/gv
# NOTE: -malign-double: for 32bits system --useless on 64its
diff -aur S52-orig/S52.c S52/S52.c
--- S52-orig/S52.c 2009-05-20 22:09:43.000000000 +0200
+++ S52/S52.c 2009-05-27 21:49:17.000000000 +0200
@@ -43,6 +43,28 @@
#define MIN_RANGE 0.01 // minimum range (NM)
+char *S52_MARparamName[] = {
+ "S52_MAR_NONE", //= 0, // default
+ "S52_MAR_SHOW_TEXT", //= 1, // view group 23
+ "S52_MAR_TWO_SHADES", //= 2, // flag indicating selection of two depth shades (on/off) [default ON]
+ "S52_MAR_SAFETY_CONTOUR", //= 3, // selected safety contour (meters) [IMO PS 3.6]
+ "S52_MAR_SAFETY_DEPTH", //= 4, // selected safety depth (meters) [IMO PS 3.7]
+ "S52_MAR_SHALLOW_CONTOUR", //= 5, // selected shallow water contour (meters) (optional)
+ "S52_MAR_DEEP_CONTOUR", //= 6, // selected deepwatercontour (meters) (optional)
+ "S52_MAR_SHALLOW_PATTERN", //= 7, // flag indicating selection of shallow water highlight (on/off)(optional) [default OFF]
+ "S52_MAR_SHIPS_OUTLINE", //= 8, // flag indicating selection of ship scale symbol (on/off) [IMO PS 8.4]
+ "S52_MAR_DISTANCE_TAGS", //= 9, // selected spacing of "distance to run" tags at a route (nm)
+ "S52_MAR_TIME_TAGS", //= 10, // selected spacing of time tags at the pasttrack (min)
+ "S52_MAR_FULL_SECTORS", //= 11, // show full length light sector lines
+ "S52_MAR_SYMBOLIZED_BND", //= 12, // symbolized area boundaries
+ "S52_MAR_SYMPLIFIED_PNT", //= 13, // simplified point
+ "S52_MAR_DISP_CATEGORY", //= 14, // display category
+ "S52_MAR_COLOR_PALETTE", //= 15, // color palette
+
+ "S52_MAR_NUM" //= 16 // number of parameters
+//...123456789012345678901234567890 // name lenght max 23
+};
+
typedef struct _cell {
S52_extent ext;
GString *filename;
diff -aur S52-orig/S52.h S52/S52.h
--- S52-orig/S52.h 2009-05-20 22:09:43.000000000 +0200
+++ S52/S52.h 2009-05-27 21:48:17.000000000 +0200
@@ -39,6 +39,8 @@
#define STD
#endif
+extern char *S52_MARparamName[];
+/*
char *S52_MARparamName[] = {
"S52_MAR_NONE", //= 0, // default
"S52_MAR_SHOW_TEXT", //= 1, // view group 23
@@ -60,6 +62,7 @@
"S52_MAR_NUM" //= 16 // number of parameters
//...123456789012345678901234567890 // name lenght max 23
};
+*/
#define S52_MAR_NAME_MAX 23
//extern DLL double STD S52_getMarinerParam(S52_MAR_param_t param);
diff -aur S52-orig/S57gv.c S52/S57gv.c
--- S52-orig/S57gv.c 2009-05-20 22:09:43.000000000 +0200
+++ S52/S57gv.c 2009-05-27 20:26:39.000000000 +0200
@@ -147,7 +147,7 @@
case GVSHAPE_COLLECTION: {
// ogr SPLIT_MULTIPOINT prob !!
//GvCollectionShape *collection = (GvCollectionShape *) shape;
- //int nCollection = gv_shape_collection_get_count(shape);
+ int nCollection = gv_shape_collection_get_count(shape);
PRINTF("nCollection = %i\n", nCollection);
diff -aur S52-orig/test/Makefile S52/test/Makefile
--- S52-orig/test/Makefile 2009-04-29 17:43:02.000000000 +0200
+++ S52/test/Makefile 2009-05-27 21:12:57.000000000 +0200
@@ -34,14 +34,14 @@
s52gv2: CFLAGS = `pkg-config --cflags gtk+-2.0 gtkglext-1.0` \
-D_REENTRANT -DGV_USE_DOUBLE_PRECISION_COORD \
- -I$(OPENEV_HOME) -I.. -DS52_USE_GV -DS52_USE_GTK2
+ -I$(OPENEV2HOME) -I.. -DS52_USE_GV -DS52_USE_GTK2
# search for libS52.so (-rpath)
S52_LIBS = -Wl,-rpath .. -L.. -lS52
# NOTE: need full path in order to find libgv.so at run-time (-rpath)
OPENEV_HOME = `pwd -P`/../../../openev
-OPENEV2HOME = `pwd -P`/../../../../openev2/trunk/src/lib/gv
+OPENEV2HOME = `pwd -P`/../../openev2/src/lib/gv
GV_LIBS = -Wl,-rpath $(OPENEV_HOME) -L$(OPENEV_HOME) -lgv
GV2LIBS = -Wl,-rpath $(OPENEV2HOME) -L$(OPENEV2HOME) -lgv
@@ -64,10 +64,11 @@
$(CC) $(CFLAGS) s52gv.c $(LIBS) -o $@
s52gv2: LIBS = $(S52_LIBS) $(GTK2LIBS) $(GV2LIBS) $(OGR_LIBS)
-s52gv2: s52gv.c testmain
+#s52gv2: s52gv.c testmain
+s52gv2: s52gv.c
$(CC) $(CFLAGS) s52gv.c $(LIBS) -o $@
-testmain:
- $(CC) $(LDFLAGS) testmain.o $(LIBS) -o $@
+#testmain:
+# $(CC) $(LDFLAGS) testmain.o $(LIBS) -o $@
s52gtk2: LIBS = $(S52_LIBS) $(GTK2LIBS) $(OGR_LIBS) $(GL__LIBS)
s52gtk2: s52gtk2.c
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|

|
Re: TypeError: GvShapes.from_ogr_layer() argument 1 must be string, not Layer
Hi Joel,
On Wed, May 27, 2009 at 4:32 PM, Joel Bjurström < maxxflow@...> wrote:
> Hi Mario and Sylvain!
>
> I'm sorry for the delay, it's been a busy time in school.
And I'm sorry for the delay too but thankfully not due to school! :)
> After applying your patch, Mario, as well as straightening out a bug in my
> "fixed" layer selection list,
> I got it working. OGR files now open beautifully! (Well, there are a few
> bugs left. The layer list for example
> seems to get messed up sometimes when loading many layers simultaneously.)
> I'm attaching my new patch for the layer dialog stuff - when applied
> together with your patch, OGR import works.
I'm glad it finally works for you. And thanks for the patches! I will
update the code eventually ;)
> I've also had a look (although a very small one) at the S52 plugin.
I will leave the S52 stuff to Sylvain because it's way out of my league!
> I'm also attaching a proposal for an INSTALL document for OpenEV2 to replace
> the aged BUILD_INSTRUCTIONS.TXT
> I might have missed something. Well, feel free to use it if you like...!
I quickly reviewed this and your patches... all seems in order. They
certainly will make it into the code base when I get time to deal with
that matter. Thanks!
cheers
--
Mario B.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Openev-discuss mailing list
Openev-discuss@...
https://lists.sourceforge.net/lists/listinfo/openev-discuss
|