Plug-in Data Source - Geographic Coordinate System

1379
2
Jump to solution
10-12-2012 12:01 PM
GregFinch
New Contributor
Hi,

We're building a plug-in data source.  The data is typical WGS1984 lat/lng data.  In the plugin data source, we're creating the spatial reference with code similar to the following:

var spatialReferenceFact = new SpatialReferenceEnvironmentClass(); shapeField.SpatialReference_2 = spatialReferenceFact.CreateGeographicCoordinateSystem(6326);


Problem is, when I try to drop the plug-in data source on a map, I get the following error:

Error opening feature class.  The specified WKID (factory code) or WKT (definition string) is not a Projected Coordinate System.


I'm curious why it's wanting a projected coordinate system.  According to the docs, I should be able to use a Geographic Coordinate System with a plug-in data source. 

Any suggestions?
0 Kudos
1 Solution

Accepted Solutions
MelitaKennedy
Esri Notable Contributor
Hi Greg,

You're creating a datum, not a geographic coordinate system. Try using 4326 rather than 6326!

geographic coordinate system: name, datum (spheroid), prime meridian, angular unit

Melita

View solution in original post

0 Kudos
2 Replies
MelitaKennedy
Esri Notable Contributor
Hi Greg,

You're creating a datum, not a geographic coordinate system. Try using 4326 rather than 6326!

geographic coordinate system: name, datum (spheroid), prime meridian, angular unit

Melita
0 Kudos
GregFinch
New Contributor
Thank you!  That fixed it.
0 Kudos