[gdal-dev] Problem with type of data in ESRI SHAPEFILE

Guilhain Averlant g.averlant at gmail.com
Mon Sep 26 15:05:59 EDT 2011


It Works !

Thanks !

Guilhain

2011/9/26 Jay L. <jzl5325 at psu.edu>

> What about something like this?  The block in the middle copies your fields
> and field definitions.  The def statement handles copying the individual
> fields for each feature.  Your script then goes in an modifies the geometry.
>
>
> This does roughly the same thing that Frank suggested, but is more script
> agnostic.  The field defs. are not manually set.
>
> J
>
>
> On Mon, Sep 26, 2011 at 9:22 AM, Frank Warmerdam <warmerdam at pobox.com>wrote:
>
>> Guilhain,
>>
>> The problem is that you aren't setting the precison when you create
>> the new fields, so it is defaulting to precision zero (integer).
>>
>> You will need a call something like:
>>    newField.SetPrecision( 11 )
>>
>> Best regards,
>>
>> On Mon, Sep 26, 2011 at 9:09 AM, Guilhain Averlant <g.averlant at gmail.com>
>> wrote:
>> > Hi Everyone
>> >
>> > I'm writting a litte script that order points coordinates.
>> >
>> > But I don't know why but I have a problem when my script rebuild data
>> > associated to geometries.
>> >
>> > In fact I have a field in REAL who is in my new shapefile well-respected
>> in
>> > Real too, but data are writting in integer...
>> >
>> > Do you have a solution ?
>> >
>> > Configuration :
>> > Python 2.6
>> > GDAL 1.8.0
>> > I try whit python 2.7 and GDAL 1.8.1 but the problem is still here.
>> >
>> > Guilhain
>> >
>> > PS : Script and data are attached to this email.
>> >
>> > _______________________________________________
>> > gdal-dev mailing list
>> > gdal-dev at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>> >
>>
>>
>>
>> --
>>
>> ---------------------------------------+--------------------------------------
>> I set the clouds in motion - turn up   | Frank Warmerdam,
>> warmerdam at pobox.com
>> light and sound - activate the windows | http://pobox.com/~warmerdam
>> and watch the world go round - Rush    | Geospatial Software Developer
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>


-- 
Guilhain AVERLANT
03 rue Germaine Tailleferre
75019 PARIS
06 28 22 83 05
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110926/0b2a14e8/attachment-0001.html


More information about the gdal-dev mailing list