Add gdallocationinfo


Have access to gdallocationinfo


Paul Meems
January 24, 2016, 10:45 AM

I've added this as a sub-task of mwgis-7 but at this moment GdalLocationInfo is not yet implemented as a function in GDAL.
I do think we should wait for that and not implement it the old-ways by copying the code to MWGIS.

Sergei Leschinsky
November 17, 2015, 7:44 AM

I don't know about signature of methods yet. The new API offers separate parameters rather than all options in a single string we have now. Probably we shall support both ways via method overloads. As for GDAL being somewhat difficult - yes I can agree on that, their API isn't always very intuitive. As for MW making it more difficult or easy, it's not for me to say. I can't be objective on that.

Olivier Leprêtre
November 16, 2015, 4:19 PM

Thanks for the answer Sergei. I'm a bit afraid as Gdal is not easy by itself (at least for a newbie) and it seems even more complicated thru MW. I hope I'm wrong just by ignorance. Does your planned upgrade will change the way to call GDAL ?

Sergei Leschinsky
November 16, 2015, 8:39 AM

Olivier, GDAL tools are available via Utils class in MapWinGIS. In MW5 they are exposed via MW5.API.Static.GdalUtils class (the actual static instance can be accessed via GdalUtils.Instance). Right now we have a copy of code for these tools in MapWinGIS, but we are going to upgrade to the latest GDAL version where they are added to GDAL's API, so we don't need to host duplicated code. The closest thing to we have is MW5.Api.Static.GeoSource.Open. Depending on type of datasource it returns particular MW5 class. Most of them use GDAL drivers under the hood.

Olivier Leprêtre
November 16, 2015, 8:04 AM

Sorry not to be precise enough, it was because I was rather generally speaking. I was thinking I could use gdal functions in the future (not knowing precisely which one) and was wondering if the solution was to download this library and reference it in my plugin or call its function from MW. In the link I sent, there was gdallocationinfo but they say it could be slow and give other solution, using If it's necessary to identify each required function and modify MW each time, could not it require several exchanges (boring for you) ? Going this way, how can I find existing mapped gdal in MW and call them ? Does functions like can be used ?

Thanks to have added gdallocationinfo, I'll try it to see if it works for me.




Olivier Leprêtre


Affects versions

Fix versions