kartena / Proj4Leaflet

Smooth Proj4js integration with Leaflet.
http://kartena.github.io/Proj4Leaflet/
BSD 2-Clause "Simplified" License
587 stars 172 forks source link

crossing line problem with geojson while using Equidistant Cylindrical (eqc) projection #182

Open hunter3789 opened 2 years ago

hunter3789 commented 2 years ago

I am having a problem with drawing geojson while using Equidistant Cylindrical (eqc) projection. "+proj=eqc +lat_0=0 +lat_ts=0 +lon_0=126 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs"

When I draw world maps, there are unexpected lines acrossing left and right side of map.

This is the example of eqc projection case and source code. example https://github.com/hunter3789/geojson/blob/main/leaflet_imgoverlay_world.html

Is there any ideas to deal with it? Thank you.

hunter3789 commented 2 years ago

I split the polygons into 2 pieces, which make the acrossing lines. I don't know this is the proper way to deal with, but it looks not bad.

those are the result and source code. example2 https://github.com/hunter3789/geojson/blob/main/leaflet_imgoverlay_world_modified.html

If there is better way, please share me. Thank you.

jidengke commented 1 year ago

I encountered the same problem, thank you for your solution

hunter3789 commented 1 year ago

Sure. Thank you for your kind words! Merry christmas and happy new year!

Best, ChangJae

2022년 12월 23일 (금) 오전 1:56, Dengke Ji @.***>님이 작성:

I encountered the same problem, thank you for your solution

— Reply to this email directly, view it on GitHub https://github.com/kartena/Proj4Leaflet/issues/182#issuecomment-1363707950, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUENBCUXMXS5NCUUEDCEZEDWOVLLHANCNFSM5N3IS4QA . You are receiving this because you are subscribed to this thread.Message ID: @.***>