我在使用GetRoute函数时出现错误如下:
The decimal degree longitude value you provided was out of range.
请问是否因为我所用的点坐标都是以米为单位,而要以decimal degree为单位?如果是这个原因,我的数据是以米为单位的shp文件,如何处理数据可以使数据适用于路径分析?
GetRoute出现错误
Wang,
请尝试下面的代码,下面代码显示了怎么样使用基于meter的数据做路径查询,其中使用到了把wgs84坐标系转化为摩卡托投影系。
Proj4Projection proj4 = new Proj4Projection();
proj4.InternalProjectionParametersString = Proj4Projection.GetDecimalDegreesParametersString();
proj4.ExternalProjectionParametersString = Proj4Projection.GetSphericalMercatorParametersString();
proj4.Open();
RtgRoutingSource routingSource = new RtgRoutingSource(streetRtgFilePathName);
FeatureSource featureSource = new ShapeFileFeatureSource(streetShapeFilePathName);
featureSource.Projection = proj4;
routingEngine = new RoutingEngine(routingSource, featureSource);
routingEngine.GeographyUnit = GeographyUnit.Meter;
Thanks,