[R-sig-Geo] Problem in EPSG 2154 => 102110

PONS Frederic - CEREMA/DTerMed/DREC/SRILH Frederic.Pons at cerema.fr
Tue Sep 22 16:25:53 CEST 2015


Dear R-users,

I have a problem when I create a spatialpolygondataframe

I want to have an EPSG 2154 but after the export the epsg is 102110.

It seems to be the "same" CRS but it is not what I want.

A small example to help me
Best regards

xlla=700000
ylla=6500000
ncolsa=1000
nrowsa=1000
cellsizea=1

tableau <- data.frame(IDENT = 1, ncols = 1000, row.names = 1)

crds <- cbind(x=c(xlla,xlla+ncolsa*cellsizea, xlla+ncolsa*cellsizea, 
xlla, xlla), y=c(ylla, ylla, ylla+nrowsa*cellsizea, 
ylla+nrowsa*cellsizea, ylla))

Pa <- Polygon (crds)
Psa <- Polygons (list ( Pa ), 1)
pola <- SpatialPolygons (list ( Psa ), proj4string=CRS("+init=epsg:2154"))
SPDFa <- SpatialPolygonsDataFrame(pola, tableau)

writeOGR(SPDFa, dsn="C:\\ajeter",layer="toto",driver="ESRI 
Shapefile",overwrite_layer=TRUE)

*Frédéric Pons *
*Expert hydraulique sur les inondations et aléas côtiers
**DREC/Service Risques Inondations Littoraux et Hydraulique **- Tél.: 
(33)4 42 24 76 68 *
*Direction Territoriale Méditerranée
*
Centre d’études et d’expertise sur les risques, l’environnement, la 
mobilité et l’aménagement
www.cerema.fr <http://www.cerema.fr>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20150922/177e3c2f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cerema.png
Type: image/png
Size: 6094 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20150922/177e3c2f/attachment.png>


More information about the R-sig-Geo mailing list