The datasource "ds" is still going out of scope as it is local to your
"getLayer2" function.
Lots of ways to avoid this. Try not wrapping it up in a function, or
return a tuple of datasource and layer e.g.
def getDSandLayer(shape_fullname):
ds = ogr.Open(shape_fullname, 0)
layer = ds.GetLa
You may change the field type by using the 'cast' sql option during the
ogr2ogr conversion, like 'select cast(DEPTH as numeric(8,2)) from SOUNDG'
for more info see: http://www.gdal.org/ogr/ogr_sql.html
Best regards,
Tamas
2010/7/21 easyl
>
> How can I let ogr2ogr keep, change or determine
Martin Dobias wrote:
This makes sense to me.
How do you see the implementation? Should OGRLayer contain the array
m_pabIgnoredFields of booleans similar to the original proposal,
together with booleans for the special fields, such sa
m_bIgnoreGeometry, m_bIgnoreStyle?
Martin,
Yes, that was my
Hi Frank
On Wed, Jul 21, 2010 at 4:45 PM, Frank Warmerdam wrote:
> Martin Dobias wrote:
>>
>> Hi,
>>
>> based on the discussion about optimizing the performance of reading
>> features in OGR few days ago, I've prepared an RFC that proposes API
>> for limiting which fields will be fetched when rea
Frank,
I'm only concerned with ogr2ogr and how it works with OS MasterMap chunked data
- which I'm currently finding a bit slow. I'll gladly leave the development of
anything else to those who understand much more than me! :-)
Regards,
Jez
-Original Message-
From: Frank Warmerda
Jez Walters wrote:
Frank,
If we "connect this to the -select option of ogr2ogr" as you suggest, it
would probably be helpful to specify fields by name rather than by number in
order to accommodate the OS MasterMap data.
>
At the risk of repeating myself from another thread, the OS MasterMap
T
Frank,
If we "connect this to the -select option of ogr2ogr" as you suggest, it would
probably be helpful to specify fields by name rather than by number in order to
accommodate the OS MasterMap data.
At the risk of repeating myself from another thread, the OS MasterMap Topology
Layer vector
Martin Dobias wrote:
Hi,
based on the discussion about optimizing the performance of reading
features in OGR few days ago, I've prepared an RFC that proposes API
for limiting which fields will be fetched when reading features:
http://trac.osgeo.org/gdal/wiki/rfc29_desired_fields
Any comments o
El día Wednesday 21 July 2010 15:53:50, easyl dijo:
> How can I let ogr2ogr keep, change or determine real number precision??
[...]
> > ogr2ogr -skipfailure -append -f "ESRI Shapefile" out shape.000 -nlt
One thing you can do is create an empty shapefile with the desired field types
and preci
Jez, Martin,
I am now convinced that the solution is to store these data in separate
tables, recording the FID of the parent record in each child record for, eg,
TopographicArea, along with the TopographicArea data. Ideally, I think the
parent record could have a TopographicArea_Counnt col
How can I let ogr2ogr keep, change or determine real number precision?? when
converting shapefiles.
ogr2ogr changes the representation (or precision) of a numeric attributes.
For example, I use ogr2ogr to convert S-57 files to shapefiles.
The layer "SOUNDG" of S-57 represents the water depth in
On Wed, Jul 21, 2010 at 3:31 PM, Jez Walters wrote:
> Martin,
>
>
> I may be misunderstanding how the API works (I'm not actually using it
> myself), but if someone wants to parse a given layer of the OS MasterMap
> vector data that is divided into chunks they can't use fixed field numbers,
> b
Martin,
I may be misunderstanding how the API works (I'm not actually using it myself),
but if someone wants to parse a given layer of the OS MasterMap vector data
that is divided into chunks they can't use fixed field numbers, because the
field order varies between chunks.
For example, suppo
On Wed, Jul 21, 2010 at 1:36 PM, Jez Walters wrote:
> Although I take your point about the interface not affecting ogr2ogr, surely
> the potential speed boost is worth extending to this utility too - or would
> that be a separate ticket? I for one would welcome improving the performance
> of o
Yes, you are correct...
An investigation led me to the same conclusion. I guess most of the
users of previous version of my plugin, which was compiled with VSE2008,
had the correct libraries installed.
Same problem was seen even with that version but not so often as now.
Thanks, always nice
Martin,
Although I take your point about the interface not affecting ogr2ogr, surely
the potential speed boost is worth extending to this utility too - or would
that be a separate ticket? I for one would welcome improving the performance
of ogr2ogr using the approach you have suggested - when
Hi Tomas,
On Wed, 21. Jul 2010 at 12:50:31 +0200, Tomas R wrote:
> is that really as it should be? Should really the result depend on files
> from the environment it was compiled in? Must I go back to VSE2008 and
> recompile Gdal to make it work on all machines or is there a setting
> somewh
It seem like, after a friend checked the wrap-files with Dependency
Walker, that there are references to msvcr100.dll and msvp100.dll which,
as far as I know, are runtime files from Visual Studio 2010.
is that really as it should be? Should really the result depend on files
from the environment
Hi Jaz
On Wed, Jul 21, 2010 at 10:43 AM, Jez Walters wrote:
> Martin,
>
>
> When I convert Ordnance Survey MasterMap GML to ESRI Shapefiles using
> ogr2ogr, I'm getting different field numbers for the same field name in
> different GML chunk files. Apologies if I have the wrong end of the stic
Alex,
The GDALWarpOperation class gives you extrapolation options. Make sure to
set the variable GDALWarpOptions::eResampleAlg to GRA_CubicSpline.
On Wed, Jul 21, 2010 at 2:09 PM, Alexander Plum wrote:
> Hello there,
>
> I want to increase the size of a GDALDatasetH which has 1177 lines und 117
Martin,
When I convert Ordnance Survey MasterMap GML to ESRI Shapefiles using ogr2ogr,
I'm getting different field numbers for the same field name in different GML
chunk files. Apologies if I have the wrong end of the stick, but wouldn't your
proposed interface therefore require me to invoke
Hello there,
I want to increase the size of a GDALDatasetH which has 1177 lines und 1177
pixels.
It should have 7061 lines and also 7061 pixels but I do not know how to
extrapolate the size of the GDALDataset.
The cells of the GDALDatasetH contain elevation values.
The cublicspline algorithm sha
Hi,
based on the discussion about optimizing the performance of reading
features in OGR few days ago, I've prepared an RFC that proposes API
for limiting which fields will be fetched when reading features:
http://trac.osgeo.org/gdal/wiki/rfc29_desired_fields
Any comments or suggestions are highl
I have a Gdal-plugin for the eminent program SportTracks. This plugin
gives access to the Gdal libraries for other plugins of the program.
Works great, normally.
But on some, or possibly all, WinXP computers it fails. It fails setting
up the environment for the plugin, the path.
The plugin i
> drv_shp and shp_ds are going out of scope. Use
> ogr.Open, which will take care of all of this for you.
>
Thanks Howard
I am using now ogr.Open but there is still the same problem. Looks like I need
to reopen the layer in each method, as far as it seems it cannot exist the
layer without its
25 matches
Mail list logo