Failed to draw layer error with mysql points

Sarah Parrott parrott.sarah at GOOGLEMAIL.COM
Tue Jul 25 09:52:08 PDT 2006


Hi,

 I've tried shp2img, and to start with it couldn't find the path but I found
it in the mapserver directory. When I issue this command:
/usr/local/mapserver-4.8.3/shp2img -m dartmoor_points.map test.gif

I get the following error:

msDrawMap(): Image handling error. Failed to draw layer named 'test_gis'.
<br>
msOGRLayerOpen(): General error message. OGR support is not available. <br>

so presumably I haven't compiled it with OGR support? But I don't understand
because I include --with-ogr and --with-gdal when I compile mapserver. Using
--help on the gdal configure.sh doesn't list anything for --with-ogr for
gdal so how do I include ogr? Or is that not the problem? I have succesfully
used ogrinfo on other files which makes me think that OGR is installed.

Any ideas on what is wrong?

Thanks,
Sarah

On 12/07/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
>
> Sarah Parrott wrote:
> > Hi,
> >
> >  I'm trying to get point data out of mysql to display on a map. I'm
> > using the following .ovf file, which I've tested using ogrinfo and seems
> > to work fine.
> >
> > <OGRVRTDataSource>
> >     <OGRVRTLayer name="test_gis">
> >
> > <SrcDataSource>MYSQL:test_gis,user=root,password=mypword,host=127.0.0.1
> > <http://127.0.0.1>,port=3306,tables=boxes</SrcDataSource>
> >         <SrcSQL>SELECT fid, x, y FROM boxes</SrcSQL>
> >         <GeometryType>wkbPoint</GeometryType>
> >         <GeometryField encoding="PointFromColumns" x="x" y="y" z="z"  />
> >     </OGRVRTLayer>
> > </OGRVRTDataSource>
> ...
> > I've tried loads of different things in the .map file (below) but I
> > still end up with the same problem. Does anyone know what I'm going
> wrong?
>
> Sarah,
>
> I would suggest trying shp2img on your map.  I *suspect* this is the
> problem
> with OGR datasources where OGR issues an error internally about not
> supporting
> setting attribute (or perhaps it was spatial) constraints on an
> ExecuteSQL()
> result and this causing unnecessary problems in mapserver.   But the
> expected
> error message is not visible in your report - possibly because it is being
> masked by something more generic.
>
> Possibly shp2img with DEBUG ON for the map and layer in question would
> give
> more detailed information.
>
> 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    | President OSGF, http://osgeo.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060725/7c736ad8/attachment.htm>


More information about the MapServer-users mailing list