ibrahimsaricicek wrote:
This doesn't and syas; msDrawMap(): Image handling error. Failed to draw
layer named 'Araclar'. msOGRFileOpen(): OGR error. Open failed for OGR
connection in layer `Araclar'. Parse error at EOF, not all elements have
been closed, starting with SrcSQL
CONNECTIONTYPE OGR
CONNECTION "
<OGRVRTDataSource>
<OGRVRTLayer name='Araclar'>
<SrcDataSource>ODBC:webuser/webu...@mssql</SrcDataSource>
<SrcSQL>SELECT MOBILEUNIT.MUID, MOBILEUNIT.PLATE,
MUGPSDATALOG.LONGITUDE, MUGPSDATALOG.LATITUDE FROM MOBILEUNIT INNER JOIN
MUGPSDATALOG ON MOBILEUNIT.MUID=MUGPSDATALOG.MUID WHERE
MUGPSDATALOG.EVENTLOGID IN(SELECT MAX(EVENTLOGID) FROM MUFLEET INNER JOIN
MUGROUP ON MUFLEET.FLEETID = MUGROUP.FLEETID INNER JOIN MOBILEUNIT ON
MUGROUP.GROUPID = MOBILEUNIT.GROUPID INNER JOIN MUGPSDATALOG ON
MOBILEUNIT.MUID=MUGPSDATALOG.MUID where MUFLEET.FLEETID=37144 group by
MOBILEUNIT.MUID) ORDER BY MOBILEUNIT.PLATE</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding='PointFromColumns' x='LONGITUDE'
y='LATITUDE'></GeometryField>
</OGRVRTLayer>
</OGRVRTDataSource>"
But why?
Ibrahim,
I was unable to reproduce the problem parsing this XML VRT. I don't
know what is going wrong. I had expected to find a "<" sign in the
sql that was not escaped properly as < but I see none.
And why ogr connection is too slow? Is there a way for speeding-up?
You will likely want to list the tables to be scanned on accessing
the database in the connection string or else all are scanned for
the schema - at great expense. Also, be aware that SrcSQL results
are slow if used in random access mode - such as is done my MapServer's
query mechanisms. That should not be a problem for simple drawing though.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmer...@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users