MapWindow 4 - ActiveX Control Programming : MapWindow Discussion Forum
Hi there! I just updated from 4.6 to 4.8 (RC3)...after a long guess...as my projects are rather complex. But the new functionality is really great! And I believe updating my projcts is it worth while. Before updating, I was about to implement reprojection myself
Reprojecting...
Posted by: fredericus ()
Date: November 11, 2011 02:51AM

Hi there!

I just updated from 4.6 to 4.8 (RC3)...after a long guess...as my projects are rather complex.
But the new functionality is really great! And I believe updating my projcts is it worth while.

Before updating, I was about to implement reprojection myself (NTv2), but found that projections are now part of Mapwingis.

So, how to use the functions? As the documentation is at least sparse, I have no clou how to reproject a shape.

Is it possible to reproject a coordinate/point/shape/shapefile from DHDN (projected) to WGS84 (geographic)? (I know this is a rather complicated task...)

And how to do it?

I am using Access and VBA.

Sincerely
Burkhart

Options: ReplyQuote
Re: Reprojecting...
Posted by: pmeems ()
Date: November 11, 2011 03:47AM

You can have a look at source code of the Reprojection tool in the toolbox or at this test script: [svn.mapwindow.org]

The 'trick' is to use the EPSG code to get the projection string.

--
Paul

--
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group

Download the latest beta installer at:
tinyurl.com/mwMonthly 32-Bit
tinyurl.com/mwMonthlyx64 64-Bit
Follow me on Twitter MapWindow_nl to read when a new installer is published.

---
Paul Meems
The Netherlands
[www.bontepaarden.nl]
Release manager, configuration manager and
forum moderator of MapWindow GIS

Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl

*******
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
*******
View my profile on LinkedIn

Options: ReplyQuote
Re: Reprojecting...
Posted by: fredericus ()
Date: November 11, 2011 07:11AM

Hi Paul,

thank you for the fast reply.

So far I've got it working now. But....

prj.ImportFromEPSG (EPSGCode) doesn't work.
So that prj.ExportToWKT responds with an empty string.

Using prj.ImportFromESRI (WKT-String) works like a charm.

But it would be nice to have EPSG working.

Another question: Is there a way to just reproject a single coordinate pair (without generating a shapefile)?

Sincerely
Burkhart

Options: ReplyQuote


Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: