[FWTools] Failure during the loading and missing polygons - MySQL

springrider springrider at hotmail.com
Thu Mar 4 23:21:44 EST 2010


Thanks Frank for your quick reply.

I tried with the -nlt command such as below:
D:\3-GIS\data\continents\cntry98_ESRI>ogr2ogr -f MySQL MySQL:ofp,user=root
cntry
98.shp -nln countries -update -overwrite -lco GEOMETRY_NAME=GEOMETRY -a_srs
"EPS
G:4326" -nlt geometry

But it didn't have any effects.

I had a quick look to perimeters of polygons and effectively Russia and
Canada with Antarctica are the ones having the longest coastlines. So a
limitation in the length of the SQL could be a good explanation.
Will have a look at the bug list. 
Effectively not very lucky on this one, will try otherwise to simplify the
geometries.

Thanks

Sylvain



Frank Warmerdam-2 wrote:
> 
> springrider wrote:
>> Good morning
>> 
>> I tried to load some polygons into MySQL 5.1.43 using Fwtools. It is a
>> shapefile representing the world countries found on the Esri website.
>> When i
>> run the ogr2ogr commands, i got a :
>> "ERROR 1: Terminating translation prematurely after failed
>> translation of layer cntry98 (use -skipfailures to skip errors)"
>> So i used the skipfailure and i found out that Russia and Canada were
>> missing.
>> I check the geometry for these 2 polygons and they are OK.
>> 
>> Why can't i load these 2 polygons?
> 
> Sylvain,
> 
> My guess is because the table is getting setup with a geometry type
> of polygon, but some geometries are multipolygons.  If this is the
> case you would need to create the table as type "geometry" so it can
> hold any geometry with the "-nlt geometry" commandline switch.
> 
> Alternatively, the problem may be that these geometries are too large
> and the constructed SQL insert statement is too large.  If this is the
> case you are pretty much out of luck.  You could check if there is a bug
> filed on this in the GDAL/OGR Trac.  If not you could file one.  But I'm
> not
> sure how easy it will be to fix.
> 
> Best regards,
> -- 
> ---------------------------------------+--------------------------------------
> 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 Programmer for Rent
> 
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/
> 
> 

-- 
View this message in context: http://old.nabble.com/Failure-during-the-loading-and-missing-polygons---MySQL-tp27788582p27789791.html
Sent from the FWTools mailing list archive at Nabble.com.



More information about the FWTools mailing list