AnsweredAssumed Answered

Android RouteTask throws invalid Spatial Reference exception with custom spatial reference

Question asked by deleted-user-Ohz6rwd1kavx on Jan 12, 2015
Latest reply on Jan 29, 2015 by deleted-user-Ohz6rwd1kavx

Hey There,

I'm developing a disconnected routing tool with Esri Android SDK 10.2.4 and everything works fine until... the data are in the client's spatial reference, which is just an Albers projection with different parameters values.

When the runtime network dataset is in the client's SR, I get an Invalid Spatial Reference exception on RouteParameters.setStops(). However, when I use an Esri spatial reference, (a similar Albers project) everything works great. I should add that solve works fine in ArcMap using the client's SR.

Is this something that may not be supported? The obvious differences are directly at the top (below), custom SR has no WKID and Authority.

Is there a setting I'm missing? We _may_ be able avoid using the client's spatial reference for the Network Dataset, but I'd need to wrap my head around the consequences. The client would like the map in their SR and we also have requirements to query data, so we'll have a local feature layers based on the same streets, and we neither want to carry this data on device twice, nor incur on-the-fly reprojection penalty.

Anyway the two SRs are presented below for comparison. Any assistance appreciated.

Thanks,

-Cory

Esri Spatial Reference (solve works fine)

NAD_1983_2011_Contiguous_USA_Albers
WKID: 6350 Authority: EPSG

Projection: Albers
False_Easting: 0.0
False_Northing: 0.0
Central_Meridian: -96.0
Standard_Parallel_1: 29.5
Standard_Parallel_2: 45.5
Latitude_Of_Origin: 23.0
Linear Unit: Meter (1.0)

Geographic Coordinate System: GCS_NAD_1983_2011
Angular Unit: Degree (0.0174532925199433)
Prime Meridian: Greenwich (0.0)
Datum: D_NAD_1983_2011
  Spheroid: GRS_1980
    Semimajor Axis: 6378137.0
    Semiminor Axis: 6356752.314140356
    Inverse Flattening: 298.257222101


Custom SR (solve fails)
Client_NAD_1983_Contiguous_USA_Albers
Authority: Custom

Projection: Albers
False_Easting: 0.0
False_Northing: 0.0
Central_Meridian: -84.0
Standard_Parallel_1: 29.5
Standard_Parallel_2: 45.5
Latitude_Of_Origin: 37.5
Linear Unit: Meter (1.0)

Geographic Coordinate System: GCS_North_American_1983
Angular Unit: Degree (0.0174532925199433)
Prime Meridian: Greenwich (0.0)
Datum: D_North_American_1983
  Spheroid: GRS_1980
    Semimajor Axis: 6378137.0
    Semiminor Axis: 6356752.314140356
    Inverse Flattening: 298.257222101

Outcomes