[gdal-dev] dgn to mysql

Attila Berényi aberenyi at burken.hu
Wed Dec 5 09:48:35 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Frank,

You're probably right:
atis at shire ~ $ equery list |grep gdal
sci-libs/gdal-1.4.2

Any idea when will be the gentoo portage updated to 1.4.4 or to 1.5.0b1?
Or is it better if compile it from source?

Thanks again,

Attila

Frank Warmerdam írta:
> Berényi Attila wrote:
>> Dear Folks,
>>
>> I've tried to convert a DGN drawing to MySQL with ogr2ogr, but
>> I've got this error message: "ERROR 1: MySQL error message:Column
>>  'SHAPE' cannot be null Description: INSERT INTO elements (SHAPE
>> , type, level, graphicgroup, colorindex, weight, style) VALUES
>> (GeometryFromText('LINESTRING (600 200 0,650 230 0)',-1) , 3, 1,
>> 0, 0, 0, 0)"
>>
>> The appropriate command: "ogr2ogr -f MySQL
>> MySQL:test,user=xxx,password=xxx drawing.dgn -overwrite -nlt
>> GEOMETRY "
>>
>> I've edited the MySQL table, but no success at all.
>>
>> Any idea? Could be because of the 3 dimensional drawing?
>
> Attila,
>
> What version of GDAL are you using?  The above is attempting to
> insert a 3D geometry into mysql and it is my understanding that
> mysql only supports 2D geometries.  I believe there was a bug fix
> related to this somewhat recently.  It should be fixed in GDAL
> 1.4.4 and GDAL 1.5.0b1.
>
> http://trac.osgeo.org/gdal/ticket/1848
>
> I can't think of any trivial workaround to force your geometries to
>  2D with ogr2ogr (unfortunately).
>
> Best regards,

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVrpD76iTSmN9z2ARAioiAJ9HUP3wyc21Dl5fKry3cDjmcXmAlACdETXC
oTLAgOSvpuRZcAt4KxzeEp4=
=5PIg
-----END PGP SIGNATURE-----



More information about the gdal-dev mailing list