Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArcGIS Layer GridSetBuilder incorrect axis ordering #1127

Open
esemplare opened this issue Mar 16, 2023 · 1 comment
Open

ArcGIS Layer GridSetBuilder incorrect axis ordering #1127

esemplare opened this issue Mar 16, 2023 · 1 comment

Comments

@esemplare
Copy link

Testing 1.23.RC1 for WMTS of an ArcGIS Tile Cache, first release since 1.10.5 that works (#1012).

The cached tiles are EPSG:4326. Here is an excerpt of the conf.xml

<SpatialReference xsi:type='typens:GeographicCoordinateSystem'>
      <WKT>
        GEOGCS[&quot;GCS_WGS_1984&quot;,DATUM[&quot;D_WGS_1984&quot;,SPHEROID[&quot;WGS_1984&quot;,6378137.0,298.257223563]],PRIMEM[&quot;Greenwich&quot;,0.0],UNIT[&quot;Degree&quot;,0.0174532925199433],AUTHORITY[&quot;EPSG&quot;,4326]]</WKT>
      <XOrigin>-399.99999999999989</XOrigin>
      <YOrigin>-399.99999999999989</YOrigin>
      <XYScale>11258999068426.24</XYScale>
      <ZOrigin>-100000</ZOrigin>
      <ZScale>10000</ZScale>
      <MOrigin>-100000</MOrigin>
      <MScale>10000</MScale>
      <XYTolerance>8.9831528411952133e-009</XYTolerance>
      <ZTolerance>0.001</ZTolerance>
      <MTolerance>0.001</MTolerance>
      <HighPrecision>true</HighPrecision>
      <LeftLongitude>-180</LeftLongitude>
      <WKID>4326</WKID>
    </SpatialReference>
    <TileOrigin xsi:type='typens:PointN'>
      <X>-180</X>
      <Y>90</Y>
    </TileOrigin>

The ordering is expected to be yCoordinateFirst when being loaded by ArcGIS Javascript API. This value is hardcoded in GridSetBuilder to false.

https://github.com/GeoWebCache/geowebcache/blob/1.23-RC1/geowebcache/arcgiscache/src/main/java/org/geowebcache/arcgis/layer/GridSetBuilder.java#L61

It seems there is some history regarding the axis ordering with 4326 and looking at other OGC GetCapabilities Request and WMTSCapabilities.xml online; TileSets of EPSG:4326 specify [lat lon] for the top left corner; but for CRS84 it is [lon lat].

Setting that value to true fixes my issue. Should yCoordinateFirst change based on the detected CRS?

Some references:

@marsikv
Copy link

marsikv commented Jan 11, 2024

Could it be related to the fact that when publishing a TPK created in ArcGIS Pro in EPSG:2180 (Poland), the map display of WMTS is offset somewhere in the Indian Ocean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants