[gdal-dev] Open failed for OGR connection

Murat Beyhan beyhan at deprem.gov.tr
Tue Sep 21 04:07:02 EDT 2010


Dear friends,

I could not solve the problem for OGR connections.

from terminal I use the following codes and it works fine

[murat at localhost makedaskmap]$ ogrinfo
"MySQL:testogr,user=root,password=mysql_123"
INFO: Open of `MySQL:testogr,user=root,password=mysql_123'
      using driver `MySQL' successful.
1: deniz (Polygon)
2: il_merkezleri (Point)
3: il_sinirlari (Polygon)
4: ilce_merkezleri (Point)
5: ilce_sinirlari (Polygon)
6: iller (Polygon)
7: iller_sil (Polygon)
8: komsular (Polygon) 

But when I try to read data from mysql database it doesn't work for it.
and mapserver gives error as follows

msDrawMap(): Image handling error. Failed to draw layer named 'ilcmrk'.
msOGRFileOpen(): OGR error. Open failed for OGR connection in layer
`ilcmrk'. File not found or unsupported format.

part of map file as follows for the layer ilcmrk

data ilce_merkezleri is stored in Mysql table testogr as point 

I have reganerated the ilce_merkezleri data in MySql database as follows

ogr2ogr -f MySQL MySQL:testogr,user=root,password=mysql_123 ilcmrk.shp
-nln ilce_merkezleri -update -overwrite -lco GEOMETRY_NAME=SHAPE2



LAYER
  connectiontype ogr
 CONNECTION "MySQL:testogr,user=root,password=mysql_123" 
 NAME "ilcmrk"
  DATA ilce_merkezleri
  STATUS default
  TYPE POINT
  CLASS
    NAME "iLCE MERKEZi"
    SYMBOL "cpoint"
    SIZE 1
    COLOR 72 118 255	
  END
END


What is wrong with my procedures. Please help me.
Murat



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the gdal-dev mailing list