[mapserver-users] getting error

Jeff McKenna jmckenna at gatewaygeomatics.com
Sat Dec 20 08:51:22 PST 2008


muzaffar hussain wrote:
> hi
> 
>  first i have created table in *mysql *as  *testdata *which have four 
> fields*(areaID,x,y,sampleValue)*
> 
> then i have created *aqidata.ovf* which have following code mention below
> 
> 
> *<OGRVRTDataSource>
>     <OGRVRTLayer name="aqidata">
>         <SrcDataSource>MYSQL:aqiTest,user=uuuuu,password=ppppp,host=192.170.1.100,port=3306,tables=testdata</SrcDataSource> 
> 
>         <SrcSQL>SELECT areaID, x, y, sampleValue FROM testdata</SrcSQL> 
>         <GeometryType>wkbPoint</GeometryType>
>         <GeometryField encoding="PointFromColumns" x="x" y="y"/> 
> 
>     </OGRVRTLayer>
> </OGRVRTDataSource>*
> 
> 
> then i have execute this .ovf in command line as follows
> 
> *C:\ms4w\tools\gdal-ogr>ogrinfo aqidata.ovf
> ERROR 4: Update access not supported for VRT datasources.
> 
> Had to open data source read-only.
> INFO: Open of `aqidata.ovf'
>       using driver `VRT' successful.
> 1: aqidata (Point)*
> 
> then i have created map file as follows
> 
> 
> 
> *LAYER
>     NAME "MyAqi"
>     STATUS DEFAULT
>     TYPE POINT
>     CONNECTIONTYPE OGR  
>     CONNECTION "aqidata.ovf"
>     DATA "aqidata"
> 	
>     CLASS 
> 
>        NAME "MyClass"
>            STYLE
>                SYMBOL 'circle'
>                SIZE 15
>                COLOR 0 255 0
>            END
>     END
> END  
> 
> #Circle symbol
>       SYMBOL
> 
>         NAME 'circle'
>         TYPE ellipse
>         FILLED true
>         POINTS
>           1 1
>         END
>       END 
> END
> 
> 
> *after that if i try to execute this map file means its showing the error
> 
> *
> 
> C:\ms4w\tools\mapserv>shp2img -m ogr.map -o test.png
> msDrawMap(): Image handling error. Failed to draw layer named 'MyAqi'. <br>
> msOGRFileOpen(): OGR error. Open failed for OGR connection in layer `MyAqi'.  Fi
> 
> le not found or unsupported format. <br>**
> *
> 
> please help me out from this ,where i have done a mistake
> 
> 
> thanks in advance
> 
> muzaffar
> 
> 
> 
> On Fri, Dec 19, 2008 at 8:25 PM, Fawcett, David 
> <David.Fawcett at state.mn.us <mailto:David.Fawcett at state.mn.us>> wrote:
> 
>     Muzaffar,
>      
>     I think that we would have to see the text from your map file to
>     figure this out. 
>      
>     What format is your data in?  (Based on the name, I have a guess
>     that it is possible that you are using MySQL and following the HowTo
>     that I wrote a long time ago...)
>      
>     If you are using MySQL, it could be that your MapServer binary was
>     not compiled with a version of ogr that supports MySQL input.  What
>     do you get when you type mapserv -v ?
>      
>     We definitely need more info to help you.  
>      
>     David. 
> 
>         -----Original Message-----
>         *From:* mapserver-users-bounces at lists.osgeo.org
>         <mailto:mapserver-users-bounces at lists.osgeo.org>
>         [mailto:mapserver-users-bounces at lists.osgeo.org
>         <mailto:mapserver-users-bounces at lists.osgeo.org>] *On Behalf Of
>         *muzaffar hussain
>         *Sent:* Thursday, December 18, 2008 11:39 PM
>         *To:* mapserver-users at lists.osgeo.org
>         <mailto:mapserver-users at lists.osgeo.org>
>         *Subject:* [mapserver-users] getting error
> 
>         hi
>             
>           i am getting the following error if i am executing *"shp2img
>         -m ogr.map -o test.png"*
> 
>         *msDrawMap(): Image handling error. Failed to draw layer named
>         'MyAqi'. <br>
>         msOGRFileOpen(): OGR error. Open failed for OGR connection in
>         layer `MyAqi'.  Fi
>         le not found or unsupported format. <br>*
> 
>         please help out from this.
> 
>         thanks in advance
> 
> 
>         muzaffar

I don't see any reference to you creating an ODBC connection to your 
table, as in 
http://mapserver.gis.umn.edu/docs/reference/vector_data/VirtualSpatialData 
  I would try those steps listed in that page.

-jeff



-- 
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/





More information about the MapServer-users mailing list