[mapserver-users] getting error

muzaffar hussain mhd.muzaffar at gmail.com
Fri Dec 19 23:28:02 EST 2008


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>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] *On Behalf Of *muzaffar hussain
> *Sent:* Thursday, December 18, 2008 11:39 PM
> *To:* 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20081220/afc1f72c/attachment.html


More information about the mapserver-users mailing list