Skip to content

project the lat./long. to x/y

3 messages · zhijie zhang, Roger Bivand

#
On Wed, 6 Dec 2006, zhijie zhang wrote:

            
Coordinate systems are unusually difficult to understand for everybody!

In rgdal:

EPSG <- make_EPSG()
EPSG[grep("Xian", EPSG$note), 1:2]

gives a list of the known projections including "Xian",

among which:

CRS("+init=epsg:2384")

looks promising. The a= and b= specify the ellipsoid used, but I have not
been able to find an authority to confirm that it is D_Xian_1980. One way
to check would be to take a long/lat value in WGS84 (for known datum) and
convert it to the target projection in both ArcGIS and with spTransform()
in rgdal, and see how far they differ. I do not see anything helpful in 
http://www.asprs.org/resources/GRIDS - referenced on the make_EPSG help 
page, which is often a good authority, so you may need to double-check 
with local sources.

The way to go would be to make your (point?) data set into a Spatial* 
object with a projection argument like CRS("+proj=longlat +ellps=WGS84") 
if the ellipsoid is correct, and use spTransform to get to the 
Gauss_Kruger Xian datum representation.

Roger

PS. Yes, the Windows binary of the rgdal version you give below was built 
on R 2.4.0 (you are on Windows?). You need to download a Windows binary 
package manually from http://cran.r-project.org/bin/windows/contrib/ 
(there is a 0.4-12 version for R 2.3); the same may apply to other 
packages.

  
    
4 days later