简体   繁体   中英

Registering projection in openlayers

Im trying to add projection 'EPSG:6875' to my openlayers but I don´t know how the parameters work. Can someone explain me how could I do it. I have this code as example:

proj4.defs('EPSG:21781',
  '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 ' +
  '+x_0=600000 +y_0=200000 +ellps=bessel ' +
  '+towgs84=660.077,13.551,369.344,2.484,1.783,2.939,5.66 +units=m +no_defs');
register(proj4);
const swissProjection = getProjection('EPSG:21781');

I would like to do the same for 'EPSG:6875'

You can use: https://epsg.io/6875

On epsg.io you have any example and details do you need.

For EPSG:6875 you need something like this:

proj4.defs("EPSG:6875","+proj=tmerc +lat_0=0 +lon_0=12 +k=0.9985 +x_0=7000000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs");
register(proj4);
const italyProjection = getProjection('EPSG:6875');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM