Question

Converting from one CRS to another when original coords go over the date line


Badge +1

Hi,

I have WKT coordinates which come in in various different CRSs which I need to convert to WKT in WGS84 (EPSG:4326). This is normally fine when using the CoordinateSystemSetter -> GeometryReplacer -> Reprojector. But when the original coords go over the poles or international dateline, it throws back incorrect polygons.

The coords below are an example. It is from a custom CRS in North Pole Lambert Azimuthal Equal Area and covers eastern Russia, Alaska and the north pole.

POLYGON((-2882659.85016878 -3711538.9388638586,-2882659.85016878 594006.5865267662,3321679.6288351263 594006.5865267662,3321679.6288351263 -3711538.9388638586,-2882659.85016878 -3711538.9388638586))

When converted using the transformers listed above, the WGS84 coords it gives back is:

POLYGON ((102.164406 46.842472,38.356495 63.39263,-119.86113 59.399704,-178.17273 44.107033,102.164406 46.842472)) covering Europe and part of N. America.

 

Has anybody got a clever workaround for this?

Thanks


5 replies

Userlevel 2
Badge +17

Hi @soothsayers,

Please try the solution described in the following article:

https://knowledge.safe.com/articles/34013/dateline-problem.html

Badge +1

Hi @soothsayers,

Please try the solution described in the following article:

https://knowledge.safe.com/articles/34013/dateline-problem.html

Thanks for your reply @daveatsafe,

I'm afraid the problem is more that FME doesn't seem to like to source coordinates and struggles to convert them, so converting to any other CRS seems futile. I have attached a simple workbench to show what I mean.

Maybe it's FME, or maybe it's the coordinates that are being sent to it?

The default values in the attached workbench are what I've been testing. Eastern Russia, north pole and Canada from a polar projection. The output geometry is between Antarctica and Australia.

Similarly, I've tested a polygon that is just eastern Russia and doesn't go over the pole/dateline and this doesn't work either, again projecting towards Antarctica. These coords are:

POLYGON((1839276.9074319955 -1994004.7019159137,1839276.9074319955 -1144100.800621023,3063997.97867997 -1144100.800621023,3063997.97867997 -1994004.7019159137,1839276.9074319955 -1994004.7019159137))

 

4326coordsextractor.fmw

 

Userlevel 2
Badge +17

Thanks for your reply @daveatsafe,

I'm afraid the problem is more that FME doesn't seem to like to source coordinates and struggles to convert them, so converting to any other CRS seems futile. I have attached a simple workbench to show what I mean.

Maybe it's FME, or maybe it's the coordinates that are being sent to it?

The default values in the attached workbench are what I've been testing. Eastern Russia, north pole and Canada from a polar projection. The output geometry is between Antarctica and Australia.

Similarly, I've tested a polygon that is just eastern Russia and doesn't go over the pole/dateline and this doesn't work either, again projecting towards Antarctica. These coords are:

POLYGON((1839276.9074319955 -1994004.7019159137,1839276.9074319955 -1144100.800621023,3063997.97867997 -1144100.800621023,3063997.97867997 -1994004.7019159137,1839276.9074319955 -1994004.7019159137))

 

4326coordsextractor.fmw

 

Hi @soothsayers,

The coordinate system you have set on the test feature is EPSG:102036, which is South Pole Gnomonic, which is why the data is ending up near the South Pole. I changed this to EPSG:102034 (North Pole Gnomonic), and the polygons now seem to end up near where you said they should be.

Badge +1

Hi @soothsayers,

The coordinate system you have set on the test feature is EPSG:102036, which is South Pole Gnomonic, which is why the data is ending up near the South Pole. I changed this to EPSG:102034 (North Pole Gnomonic), and the polygons now seem to end up near where you said they should be.

Hi @daveatsafe

Thanks for spotting this. The information comes from an external source, and we naively assume what we're being sent is correct! I will delete this thread soon, but do you know why certain CRSs are not used by FME, e.g. EPSG:102038 / EPSG:3572?

Many thanks

Userlevel 2
Badge +17

Hi @daveatsafe

Thanks for spotting this. The information comes from an external source, and we naively assume what we're being sent is correct! I will delete this thread soon, but do you know why certain CRSs are not used by FME, e.g. EPSG:102038 / EPSG:3572?

Many thanks

Hi @soothsayers,

They may be used, but not yet mapped to the appropriate EPSG code ( most common), or they have not yet been added to the CSMAP reprojection library used by FME.

We do not yet have an automated way to add coordinate systems from the EPSG database (sigh), and they do tend to proliferate like crazy.

Reply