It Works !<br><br>Thanks !<br><br>Guilhain<br><br><div class="gmail_quote">2011/9/26 Jay L. <span dir="ltr"><<a href="mailto:jzl5325@psu.edu">jzl5325@psu.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
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. <div>
<br></div><div>This does roughly the same thing that Frank suggested, but is more script agnostic. The field defs. are not manually set.<div><br></div><div><font color="#888888">J</font><div><div></div><div class="h5"><br>
<br><div class="gmail_quote">On Mon, Sep 26, 2011 at 9:22 AM, Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Guilhain,<br>
<br>
The problem is that you aren't setting the precison when you create<br>
the new fields, so it is defaulting to precision zero (integer).<br>
<br>
You will need a call something like:<br>
newField.SetPrecision( 11 )<br>
<br>
Best regards,<br>
<div><div></div><div><br>
On Mon, Sep 26, 2011 at 9:09 AM, Guilhain Averlant <<a href="mailto:g.averlant@gmail.com" target="_blank">g.averlant@gmail.com</a>> wrote:<br>
> Hi Everyone<br>
><br>
> I'm writting a litte script that order points coordinates.<br>
><br>
> But I don't know why but I have a problem when my script rebuild data<br>
> associated to geometries.<br>
><br>
> In fact I have a field in REAL who is in my new shapefile well-respected in<br>
> Real too, but data are writting in integer...<br>
><br>
> Do you have a solution ?<br>
><br>
> Configuration :<br>
> Python 2.6<br>
> GDAL 1.8.0<br>
> I try whit python 2.7 and GDAL 1.8.1 but the problem is still here.<br>
><br>
> Guilhain<br>
><br>
> PS : Script and data are attached to this email.<br>
><br>
</div></div>> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
><br>
<br>
<br>
<br>
--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Software Developer<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Guilhain AVERLANT<br>03 rue Germaine Tailleferre<br>75019 PARIS<br>06 28 22 83 05<br>