[Gdal-dev] Re: Problem using EPSG in C#
Tomas R
monshi at home.se
Wed May 9 03:51:55 EDT 2007
I add to previous posts a try with FileMon.
I start with calling gdal.PusFinderLocation and gdal.SetConfigOption, I
verify with gdal.GetConfigOtion that the path is set correct but when I
try setting up a SpatialReference the path I have set is completely ignored.
A bug in C# implementation or do I miss something vital?
The path found with FileMon is, for example:
GdalTest1.vshos:2028 OPEN D:\Documents and Settings\Tomas\Mina
dokument\Visual Studio
2005\Projects\GdalTest1\GdalTest1\bin\Debug\csv\horiz_cs.csv PATH NOT
FOUND Options: Open Access: Read
(the path should bee C:\Program\FWTools1.2.2\data\)
Perhaps I should skip EPSG completely but it seems to bee such nice and
simple approach! And I don't like to leave things that don't work, but
should work, behind me!
Please
help
/Tomas
Tomas R skrev:
> To perhaps make things a bit clearer:
> I use GDAL for C# found in the distribution with FWTools. It works like
> a charm when using WKT-strings for setting up the SpatialReferences, as
> long as I get the strings correct. My environment is WinXP and Visual
> Studio Express 2005.
>
> I have a small stand-alone test application where I check how GDAL works
> and try new ways to do things. This one compiles to a single executable.
> When I try the EPSG-codes they work if I copy the data-files (all the
> csv and others) to the root of the project in VSE. When compiled this
> gives that the data-files are in the same folder as the executable and
> the depending C#-DLLs.
> But I can't make it work if the data-files are on any other location, on
> any other path!
> I try with
> GDAL.gdal.SetConfigOption("GDAL_DATA",@"C:\Program\FWTools1.2.2\data\");
> and
> GDAL.gdal.PushFinderLocation(@"C:\Program\FWTools1.2.2\data\");
> but no success. Is the paths badly formed? Are more paths needed?
>
> The goal is to use the EPSG-method in my main-application, a dll which
> is plugged in to another software. There I can't get it work in anyway,
> I have tried the same approach of copying the data-files to no luck.
>
> What do I miss? How do I properly set up the path to the data-files? Do
> I miss some initialization command? Can I query GDAL and check the setup
> or the available data-files?
>
> Yours
> Tomas
More information about the Gdal-dev
mailing list