Select to view content in your preferred language

Geographic or Projected

608
2
03-24-2010 09:48 AM
JoseSousa
Esri Contributor
Dear ArcGIS API Team,

Is it possible to know using the Flex API if a spatial reference is of type Geographic or Projected?

Thanks a lot,

José Sousa
ESRI Portugal
Tags (2)
0 Kudos
2 Replies
JU
by
Emerging Contributor
Currently the only way is to use the Spatial Reference guides to see what the WKID stands for.  There might be some way to tell based on the number but I have yet to see anything definitive on that.

http://resources.esri.com/help/9.3/arcgisserver/apis/flex/help/content/references/coordinate_system_...
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
José Sousa,

    You could use a simple function like this

public function GeoOrPro(WKID:Number):String
{
 var retVal:String = "NULL";
 
 if(WKID >= 2000 && WKID <= 4000){
  retVal= "PROJECTED";
 }else if(WKID >= 4001 && WKID <= 4904){
  retVal= "GEOGRAPHIC";
 }else if(WKID >= 20002 && WKID <= 32766){
  retVal= "PROJECTED";
 }else if(WKID >= 37001 && WKID <= 37260){
  retVal= "GEOGRAPHIC";
 }else if(WKID >= 53001 && WKID <= 53049){
  retVal= "PROJECTED";
 }else if(WKID >= 54001 && WKID <= 54053){
  retVal= "PROJECTED";
 }else if(WKID >= 65061 && WKID <= 65063){
  retVal= "PROJECTED";
 }else if(WKID >= 102001 && WKID <= 103971){
  retVal= "PROJECTED";
 }else if(WKID >= 104000 && WKID <= 104970){
  retVal= "GEOGRAPHIC";
 }
 return retVal;
}
0 Kudos