[mapserver-users] c# mapscript: a strange behavior with ovf inline connection
Tamas Szekeres
szekerest at gmail.com
Fri Jan 23 11:31:44 PST 2009
Pietro,
I doubt it it's a C# specific issue. Actually mapserver use
MS_MAXPATHLEN=1024 as the upper limit of the length of the file pathes. In
this case it seems something like SHAPEPATH is already definied in your
mapfile which is concatenated with the connection string by the mapserver
ogr driver. In this regard I don't see any reason why PHP mapscript behaves
differently (assuming you define SHAPEPATH in both cases).
I think however the OGR driver should also consider the connection is not
always define a physical path actually so this might be a issue to be
handled.
Best regards,
Tamas
2009/1/23 Pietro Giannini <pgiannini at bytewise.it>
> Hi list.
>
> I found a strange error in c# mapscript on drawing a map image when a
> layer has a virtual spatial data connection.
>
> The error is:
> System.ApplicationException was unhandled by user code
> Message="msBuildPath(): Unable to access file.
> (C:\\svil\\EMS\\map\\<OGRVRTDataSource>\n<OGRVRTLayer
> name='object'>\n<SrcDataSource>ODBC:sa/Password123 at EMS_object
> </SrcDataSource>\n<SrcLayer>object</SrcLayer>\n<FID>Id</FID>\n<SrcSQL>\nSELECT
> Dim_Unit.Id, Dim_Unit.Description, Dim_Unit.Icon AS Icon, [...] FROM
> Dim_Unit WHERE Dim_Unit.Id [...]
> </SrcSQL>\n<GeometryType>wkbPoint</GeometryType>\n<GeometryField
> encoding='PointFromColumns' x='LON'
> y='LAT'/>\n</OGRVRTLayer>\n</OGRVRTDataSource>: path is too long"
> Source="mapscript_csharp"
>
> ([...] = omissis due to lenght of the query)
>
> the error occurs only:
> - in mapscript_csharp, I tried with php_mapscript and it does not occur;
> - if the ovf connection string is INLINE at layer level, when I use the
> classic .ovf file it does not occur;
> - if the ovf connection string is longer than 1022 characters (!)
>
> other infos, if useful:
> - ODBC connection to a MS SQLserver 2005;
> - development in ASP.NET (VS2005), the deploy environment is a Share Point
> portal, the application is embedded in a WebPart.
>
> Any idea?
> many thanks
> bye ..................................pg
>
>
>
> --
> Pietro Giannini
> Bytewise srl - Area GIS
> 41°50'38.58"N 12°29'13.39"E
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090123/3a9c16ff/attachment.htm>
More information about the MapServer-users
mailing list