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

Allow URL to be an object #2627

Open
andrewharvey opened this issue Feb 12, 2025 · 3 comments
Open

Allow URL to be an object #2627

andrewharvey opened this issue Feb 12, 2025 · 3 comments
Labels

Comments

@andrewharvey
Copy link
Collaborator

As I realised in #2626 the ESRI service URLs can be quite complex, we should consider extending the schema so the URL can be provided as an object which would then be assembled by the build into the current output.

This makes it much easier for humans to create, review and modify the URL.

before

"url": "https://portal.spatial.nsw.gov.au/server/rest/services/StrataHub/MapServer/export?layers=show%3A0&imageSR={wkid}&bbox={bbox}&bboxSR={wkid}&format=png32&size={width},{height}&transparent=true&f=image&dynamicLayers=%5B%0D%0A%7B%0D%0A%22id%22%3A0%2C%0D%0A%22source%22%3A%7B%0D%0A%22type%22%3A%22mapLayer%22%2C%0D%0A%22mapLayerId%22%3A0%0D%0A%7D%2C%0D%0A%22drawingInfo%22%3A%7B%0D%0A%22renderer%22%3A%7B%0D%0A%22type%22%3A%22simple%22%2C%0D%0A%22symbol%22%3A%7B%0D%0A%22type%22%3A%22esriSFS%22%2C%0D%0A%22style%22%3A%22esriSFSSolid%22%2C%0D%0A%22color%22%3A%5B201%2C242%2C252%2C128%5D%2C%0D%0A%22outline%22%3A%7B%0D%0A%22type%22%3A%22esriSLS%22%2C%0D%0A%22style%22%3A%22esriSLSolid%22%2C%0D%0A%22color%22%3A%5B110%2C110%2C110%2C255%5D%2C%0D%0A%22width%22%3A1%0D%0A%7D%0D%0A%7D%0D%0A%7D%0D%0A%7D%0D%0A%7D%0D%0A%5D%0D%0A",

after

{
  url: "https://portal.spatial.nsw.gov.au/server/rest/services/StrataHub/MapServer/export",
  searchParams: {
    layers: "show:0",
    imageSR: "{wkid}",
    bbox: "{bbox}",
    bboxSR: "{wkid}",
    format: "png32",
    size: "{width},{height}",
    transparent: "true",
    f: "image",
    dynamicLayers: [
      {
        "id": 0,
        "source": {
          "type": "mapLayer",
          "mapLayerId": 0
        },
        "drawingInfo": {
          "renderer": {
            "type": "simple",
            "symbol": {
              "type": "esriSFS",
              "style": "esriSFSSolid",
              "color": [
                201,
                242,
                252,
                128
              ],
              "outline": {
                "type": "esriSLS",
                "style": "esriSLSolid",
                "color": [
                  110,
                  110,
                  110,
                  255
                ],
                "width": 0
              }
            }
          }
        }
      }
    ]
  }
}
@simonpoole
Copy link
Contributor

I'm not convinced that expending effort to make it easier to use the proprietary services of the Microsoft of geo is something we should do .

At least ESRI should be funding it if they want it and that includes the necessary changes for consumers of the data too (which adding this in lieu of a simple URL would force them to add).

@andrewharvey
Copy link
Collaborator Author

I don't really see much difference between the services that publishers choose, XYZ raster tiles, OGC WMS, ESRI MapServer/FeatureServer, XYZ Mapbox Vector Tiles, Cloud Optimised Geotiff. While it's easier for us to say we only support one method, it limits the number of layers we can include for mappers to use.

This ticket is about making life easier for us based on what we can control and what services and formats they are made available. We can't control what ESRI or each data publisher do, so the options are

  1. implement this and make it easier for us maintainers of ELI
  2. don't implement this, but still use the ESRI services and have a harder time maintaining the entries
  3. drop the layers completely from the index, and let mappers suffer

@simonpoole
Copy link
Contributor

  • implement this and make it easier for us maintainers of ELI
    I think you are confusing your two roles here, getting the entry right is the job of the person submitting the PR which in general isn't one of the maintainers, and if it doesn't work, their job to fix it.
  • don't implement this, but still use the ESRI services and have a harder time maintaining the entries

See above.

  • drop the layers completely from the index, and let mappers suffer
  • point out to the entity in question that they should be using international open standards to publish their data and that that would make the life of the consumers of their data easier? (this is again naturally up to the PR submitter).

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

No branches or pull requests

2 participants