Problem with reprojection

Sep 3, 2010 at 8:59 AM

Hi,

I noticed that coordinates don't match when opened form Global Mapper for instance.

What I did is that I made a trivial shapefile with only one point (44.5N, 20.5E) and projected to UTM.

            FeatureSet fs = new FeatureSet(MapWindow.Geometries.FeatureTypes.Point);
            fs.Projection = KnownCoordinateSystems.Geographic.World.WGS1984;
            fs.AddFeature(new Feature(new Coordinate(20.5, 44.5)));

            fs.Reproject(KnownCoordinateSystems.Projected.UtmWgs1984.WGS1984UTMZone34N);
            fs.SaveAs("c:\\test.shp", true);

After I opened it from Global Mapper I noticed an offset in longitude and latitude of more than 10'.

Is there a problem with projecting WGS84 geographic coordinates to UTM with same datum and if there is, what could be solution?

 

Thank you,

Dragan

Sep 3, 2010 at 3:02 PM
Dragan

This summer we ran a comprehensive test of the project library. We
started with a GCS WGS1984 coordinated and projected various
coordinate systems (see the test results page:
http://dotspatial.codeplex.com/wikipage?title=ProjectionTestResults&referringTitle=System.Spatial.Projections
). We tested the DotSpatial Library against the Proj4 Libraries and
the ESRI projection strings. The test passed if the result was within
~1mm of the original coordinate. In both cases the transformation you
are using passed both tests.

Saying that, I've never used Global Mapper and do you know if that
software is doing something behind the scenes to make the newly
projected file with the other layers in your map? Did you generate
the point at random?

Thanks
Joe (AlamoMan)



On Fri, Sep 3, 2010 at 2:59 AM, [email removed] wrote:
> From: dragandm
>
> Hi,
>
> I noticed that coordinates don't match when opened form Global Mapper for
> instance.
>
> What I did is that I made a trivial shapefile with only one point (44.5N,
> 20.5E) and projected to UTM.
>
>             FeatureSet fs = new
> FeatureSet(MapWindow.Geometries.FeatureTypes.Point);
>             fs.Projection = KnownCoordinateSystems.Geographic.World.WGS1984;
>             fs.AddFeature(new Feature(new Coordinate(20.5, 44.5)));
>
>
> fs.Reproject(KnownCoordinateSystems.Projected.UtmWgs1984.WGS1984UTMZone34N);
>             fs.SaveAs("c:\\test.shp", true);
>
> After I opened it from Global Mapper I noticed an offset in longitude and
> latitude of more than 10'.
>
> Is there a problem with projecting WGS84 geographic coordinates to UTM with
> same datum and if there is, what could be solution?
>
>
>
> Thank you,
>
> Dragan
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
Sep 5, 2010 at 6:40 PM

Joe

Thank You for the answer. It made me switch to dotspatial library instead of mapwindow6. I've been using latest mapwindow6 release until now. DotSpatial gives really accurate results, which was not the case with mapwindow6 library. Unfortunately, a different problem arises when using dotspatial dlls to load geotiff image onto map (stack overflow exception), but I guess it's because dotspatial is still in early phase...i'm sure that will be smoothed in future relases.

Concerning Global Mapper, it's a commercial software that I use to put topographic maps together so i could use them as background layer in my application. It also gives good results with various projections, so I used it as some kind of a reference to test results. Point is not random, it's some point in my country, which is in 34T zone.

Thanks again,

Dragan

 

Sep 5, 2010 at 6:50 PM
Dragan

The Mapwindow 6 library is no longer support in a fashion. The
Dotspatial libraries are derived from the Mapwindow 6 dll. The plan
is to have the Mapwindow 6 application be a shell that contains the
DotSpatial library. Thus, the debugging and code fixes are taken
place in the DS libraries. We are in the process of throughly
documenting the errors and then attempting to fix those errors. I
know the Mapwindow 6 library used the GDal plugin to handle most of
the raster file types, I'm not sure where this is in the process of
being migrated over or if the DS team will develop their own code for
this process.

If you need to know anything else, let me know.

Joe



On Sun, Sep 5, 2010 at 12:40 PM, dragandm <notifications@codeplex.com> wrote:
> From: dragandm
>
> Joe
>
> Thank You for the answer. It made me switch to dotspatial library instead of
> mapwindow6. I've been using latest mapwindow6 release until now. DotSpatial
> gives really accurate results, which was not the case with mapwindow6
> library. Unfortunately, a different problem arises when using dotspatial
> dlls to load geotiff image onto map (stack overflow exception), but I guess
> it's because dotspatial is still in early phase...i'm sure that will be
> smoothed in future relases.
>
> Concerning Global Mapper, it's a commercial software that I use to put
> topographic maps together so i could use them as background layer in my
> application. It also gives good results with various projections, so I used
> it as some kind of a reference to test results. Point is not random, it's
> some point in my country, which is in 34T zone.
>
> Thanks again,
>
> Dragan
>
>
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com