This project has moved and is read-only. For the latest updates, please go here.

GeographicCoordinateSystem::EqualParams Null References

Topics: General Topics
Aug 17, 2006 at 8:25 PM
if (this.WGS84ConversionInfo.Count != gcs.WGS84ConversionInfo.Count) return false;

for (int i = 0; i < this.WGS84ConversionInfo.Count; i++)
if (!gcs.WGS84ConversionInfoi.Equals(this.WGS84ConversionInfoi))
return false;

WGS84ConversionInfo is NULL with one of my shapefile.

Either this is not supose to be null in any scenarios, or either we can test if it's null before executing those lines of code.

You'll know better than me what to do with that Morten.

Aug 17, 2006 at 10:18 PM
Sounds like you are trying to convert between two coordinate systems with different datums. When you do that, you will need to specify the 7 Bursa Wolf parameters needed to do the datum transform.
Aug 17, 2006 at 10:20 PM
Btw, you never mentioned where the error occurs, nor what you were trying to do. So actually I have no clue whether my answer is any help to you :-)
Aug 17, 2006 at 11:49 PM
Actually, in my code, there is a place where i enforce the same projection to all the layer. The first layer becoming the base projection target.

So for each added layer, i create a transformation, from the shapefile source coord system, to the source coord system of my first layer.

Before trying to create those transformation, i need to test if both coord system are different. That's where i used EqualParams.

Tell me if it's the correct way on doing this. I just need to know if both layer are in the same coord system. Because if so, i don't need to create a Coord Transformation.
Aug 17, 2006 at 11:50 PM
hum, thanks, by the way ;)
Aug 18, 2006 at 8:36 AM
OK thanks I'll look into it.
Aug 18, 2006 at 4:55 PM
This discussion has been copied to Work Item 2291. You may wish to continue further discussion there.
Aug 18, 2006 at 5:00 PM
Resolved with changeset 3581.