[mapserver-users] Mapscript_csharp and GDAL_DATA
Tamas Szekeres
szekerest at gmail.com
Wed May 29 06:47:05 PDT 2013
David,
You probably use the GDAL ECW driver (specifically the plugin) to draw the
ecw layer. To use the GDAL/OGR plugins in your application, you should
either copy the plugin dll-s into a /gdalplugins subdirectory from where
your application is running or (alternatively) set GDAL_DRIVER_PATH
environment variable to point to this location. To set this parameter
programmatically you should use Gdal.SetConfigOption instead of
SetenvironmentVariable which change is not visible by the getenv function
call used by GDAL.
You should also make sure to copy the correct version of libecwj2.dll into
your application directory (which is not necessarily the same as the
plugins directory).
Best regards,
Tamas
2013/5/29 David Lowther <dlowther at coordinatesolutions.com>
> Hi List,****
>
> ** **
>
> I’ve run into a bit of an issue. Using
> release-1600-gdal-1-8-0-mapserver-5-6-6<http://www.gisinternals.com/sdk/PackageList.aspx?file=release-1600-gdal-1-8-0-mapserver-5-6-6.zip>in my .Net project I cannot get ECW images to draw. I receive this error:
> ****
>
> ** **
>
> msDrawMap(): Image handling error. Failed to draw layer named
> 'ecw'.;msDrawRaster(): Image handling error. Unrecognized or unsupported
> image format;drawEPP(): Image handling error. EPPL7 support is not
> available.****
>
> ** **
>
> I believe that this means that the ECW driver is not found and the EPPL7
> is just the last one of the list that Mapserver tried to use. ****
>
> ** **
>
> I am able to generate an image from the mapfile using both shp2img and
> drawmap when the SDKShell.bat is executed, so I believe that the issue in
> my .Net app is with environment variables not being set in the .Net
> application. The application is a web application, but I experience the
> same issue in a console application. ****
>
> ** **
>
> I’ve tried the guidance from gis.stackexchange pointing to this gdal
> advice:
> https://bitbucket.org/bjartn/gdalgonewild/src/4be6d86fef24/src/GdalGoneWild.Client/GdalEnvironment.cs?at=defaultwithout luck.
> ****
>
> ** **
>
> Am I on the right track with the environment variables? Has anyone had any
> luck setting these environment variables (GDAL_DATA, GDAL_DRIVER, PROJ_LIB)
> in .Net code for Mapscript use? If so, can you guide me? Or, is there a
> work around? I am even willing to put everything in the bin directory if
> that is the only way to make things work.****
>
> ** **
>
> Thanks a ton in advance for your assistance.****
>
> ** **
>
> Dave Lowther****
>
> Coordinate Solutions, Inc****
>
> ** **
>
> _______________________________________________
> 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/20130529/a9603131/attachment.htm>
More information about the MapServer-users
mailing list