Failed to draw layer error with mysql points

Frank Warmerdam warmerdam at POBOX.COM
Wed Jul 12 17:11:57 EDT 2006


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



More information about the mapserver-users mailing list