gdal_polygonize.py bindings error

View: New views
3 Messages — Rating Filter:   Alert me  

gdal_polygonize.py bindings error

by jjknoops :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Everybody,

I was trying to use gdal_polygonize.py but i get an error that i am using an old 'gen'.
But the strange thing is that i can run the script with out any variable without any problem.
When i run it without variable then i get this

>Python "C:\Program Files\FWTools2.2.8\bin\gdal_polygonize.py"

gdal_polygonize [-o name=value] [-nomask] [-mask filename] raster_file [-b band]

                [-q] [-f ogr_format] out_file [layer] [fieldname]

But when I try to use it with variable I get this message

Python "C:\Program Files\FWTools2.2.8\bin\gdal_polygonize.py"  of91035.img test

gdal.Polygonize() not available.  You are likely using "old gen"
bindings or an older version of the next gen bindings.


I am using FWTools228 on a windows XP computer. The python version I am using is the one supplied with fwtools (2.3.4)

What I am i doing wrong?

Best Regards,
Jaap Knoops

_______________________________________________
FWTools mailing list
FWTools@...
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/

Re: gdal_polygonize.py bindings error

by Frank Warmerdam-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

jjknoops@... wrote:
> Hello Everybody,
>
> I was trying to use gdal_polygonize.py but i get an error that i am
> using an old 'gen'.
> But the strange thing is that i can run the script with out any variable
> without any problem.
...
> I am using FWTools228 on a windows XP computer. The python version I am
> using is the one supplied with fwtools (2.3.4)
>
> What I am i doing wrong?

Jaap,

gdal_polygonize is not supported on FWTools because FWTools uses the old
gen bindings.  This doesn't cause a problem in the "usage message" part of
the script - only in the call to gdal.Polygonize() itself.

You can use OSGeo4W's "gdal-dev" package if you want to try out the polygonize
function.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@...
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

_______________________________________________
FWTools mailing list
FWTools@...
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/

Re: gdal_polygonize.py bindings error

by Lewie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jaap,

Did you ever get this going? I tried the latest gdal-dev version (Sept 2009), but it still refuses to go.

Now, i.s.o. the binding errors, it crashes on the "import new" statement on line 8 inside the file
c:\OSGeo4W\apps\gdal-dev\pymod\osgeo\gdal.py

Regards,
Lewie

jjknoops wrote:
Hello Everybody,

I was trying to use gdal_polygonize.py but i get an error that i am using an old 'gen'.
But the strange thing is that i can run the script with out any variable without any problem.
When i run it without variable then i get this

>Python "C:\Program Files\FWTools2.2.8\bin\gdal_polygonize.py"

gdal_polygonize [-o name=value] [-nomask] [-mask filename] raster_file [-b band]

??????????????? [-q] [-f ogr_format] out_file [layer] [fieldname]

But when I try to use it with variable I get this message

Python "C:\Program Files\FWTools2.2.8\bin\gdal_polygonize.py"? of91035.img test

gdal.Polygonize() not available.? You are likely using "old gen"
bindings or an older version of the next gen bindings.

I am using FWTools228 on a windows XP computer. The python version I am using is the one supplied with fwtools (2.3.4)

What I am i doing wrong?

Best Regards,
Jaap Knoops

_______________________________________________
FWTools mailing list
FWTools@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/fwtools
http://fwtools.maptools.org/