AuScope / ckan-docker

Scripts and images to run CKAN using Docker Compose
0 stars 2 forks source link

Include EPSG code list #34

Closed kitchenprinzessin3880 closed 6 months ago

kitchenprinzessin3880 commented 7 months ago

API - https://apps.epsg.org/api/swagger/ui/index#!/CoordRefSystem/CoordRefSystem_Search (please only includes results where the Type = geographic 2D, geographic 3D, compound, geocentric Tabular View - https://epsg.org/search/by-name/sessionkey/p6oelfobxc/searchedTerms/WGS/crs_sort_by/type/crs_sort_dir/asc#crs

Example of API result:

{
      "Code": 4191,
      "Name": "Albanian 1987",
      "Type": "geographic 2D",
      "DataSource": "EPSG",
      "Area": "Albania - onshore",
      "Remarks": "Replaced by KRGJSH-2010.",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2014-11-21T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/GeodeticCoordRefSystem/4191"
        }
      ]
}

On the online form, please create a drop downmenu combining the Code and Name: e.g. 4191-Albanian 1987 In the database, please store the Codeonly, e.g. 4191.

kitchenprinzessin3880 commented 7 months ago

@NTaherifar Not all EPSG code are loaded into the dropdown list at https://auscope-data-dev.geoanalytics.group/

Screenshot 2024-03-06 at 12 49 59 pm
NTaherifar commented 7 months ago

@kitchenprinzessin3880 Based on the API request, the following result is obtained. Could you provide an example of what code might be missing? Here's the curl command used:


curl -X GET --header 'Accept: application/json' 'https://apps.epsg.org/api/v1/CoordRefSystem/'

{
  "Results": [
    {
      "Code": 4143,
      "Name": "Abidjan 1987",
      "Type": "geographic 2D",
      "DataSource": "EPSG",
      "Area": "Cote d'Ivoire (Ivory Coast)",
      "Remarks": "Replaces Locodjo 1965 (EPSG code 4142).",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2016-12-15T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/GeodeticCoordRefSystem/4143"
        }
      ]
    },
    {
      "Code": 2165,
      "Name": "Abidjan 1987 / TM 5 NW",
      "Type": "projected",
      "DataSource": "EPSG",
      "Area": "Cote d'Ivoire (Ivory Coast) - offshore",
      "Remarks": null,
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2001-06-05T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/ProjectedCoordRefSystem/2165"
        }
      ]
    },
    {
      "Code": 2043,
      "Name": "Abidjan 1987 / UTM zone 29N",
      "Type": "projected",
      "DataSource": "EPSG",
      "Area": "Cote d'Ivoire (Ivory Coast) - west of 6°W",
      "Remarks": "Replaces Locodjo 65 / UTM 29N (EPSG code 2042).",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2000-03-07T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/ProjectedCoordRefSystem/2043"
        }
      ]
    },
    {
      "Code": 2041,
      "Name": "Abidjan 1987 / UTM zone 30N",
      "Type": "projected",
      "DataSource": "EPSG",
      "Area": "Cote d'Ivoire (Ivory Coast) - east of 6°W",
      "Remarks": "Replaces Locodjo 65 / UTM 30N (EPSG code 2040).",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2000-03-07T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/ProjectedCoordRefSystem/2041"
        }
      ]
    },
    {
      "Code": 9387,
      "Name": "AbInvA96_2020 Grid",
      "Type": "projected",
      "DataSource": "EPSG",
      "Area": "UK - Aberdeen to Inverness",
      "Remarks": "The CRS's definition through transformation ETRS89 to AbInvA96_2020-IRF (1) (code 9386) and map projection AbInvA96_2020-TM (code 9385) emulates the AbInvA96_2020 Snake projection applied to ETRS89 as realized through OSNet 2009 CORS.",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2023-01-12T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/ProjectedCoordRefSystem/9387"
        }
      ]
    },
    {
      "Code": 9388,
      "Name": "AbInvA96_2020 Grid + ODN height",
      "Type": "compound",
      "DataSource": "EPSG",
      "Area": "UK - Aberdeen to Inverness",
      "Remarks": null,
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2020-06-16T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/CompoundCoordRefSystem/9388"
        }
      ]
    },
    {
      "Code": 9384,
      "Name": "AbInvA96_2020-IRF",
      "Type": "geographic 2D",
      "DataSource": "EPSG",
      "Area": "UK - Aberdeen to Inverness",
      "Remarks": "Intermediate CRS created in 2020 to assist the emulation of the ETRS89 / AbInvA96_2020 SnakeGrid projected CRS through transformation ETRS89 to AbInvA96_2020-IRF (1) (code 9386) used in conjunction with the AbInvA96_2020-TM map projection (code 9385).",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2020-06-16T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/GeodeticCoordRefSystem/9384"
        }
      ]
    },
    {
      "Code": 4168,
      "Name": "Accra",
      "Type": "geographic 2D",
      "DataSource": "EPSG",
      "Area": "Ghana",
      "Remarks": "Ellipsoid semi-major axis (a)=20926201 exactly Gold Coast feet. Replaced by Leigon (code 4250) in 1978.",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2023-11-19T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/GeodeticCoordRefSystem/4168"
        }
      ]
    },
    {
      "Code": 2136,
      "Name": "Accra / Ghana National Grid",
      "Type": "projected",
      "DataSource": "EPSG",
      "Area": "Ghana - onshore",
      "Remarks": "Ellipsoid semi-major axis (a)=20926201 Gold Coast feet. ProjCRS sometimes found in metric form: 1 Gold Coast foot = 0.3047997101815 m. Replaced by Leigon / Ghana Metric Grid from 1978.",
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2023-11-19T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/ProjectedCoordRefSystem/2136"
        }
      ]
    },
    {
      "Code": 2137,
      "Name": "Accra / TM 1 NW",
      "Type": "projected",
      "DataSource": "EPSG",
      "Area": "Ghana - offshore",
      "Remarks": null,
      "Deprecated": false,
      "Superseded": false,
      "RevisionDate": "2000-10-19T00:00:00",
      "Links": [
        {
          "rel": "result",
          "href": "https://apps.epsg.org/api/v1/ProjectedCoordRefSystem/2137"
        }
      ]
    }
  ],
  "Count": 10,
  "Page": 0,
  "PageSize": 10,
  "TotalResults": 6853,
  "Links": [
    {
      "rel": "self",
      "href": "https://apps.epsg.org/api/v1/CoordRefSystem/"
    }
  ]
}
kitchenprinzessin3880 commented 7 months ago

@NTaherifar Please check https://apps.epsg.org/api/v1/CoordSystem/ > https://apps.epsg.org/api/swagger/ui/index#!/CoordSystem/CoordSystem_Search This will return "TotalResults": 114 pageSize - The number of entries to return, the default is 10. That's why your query returned limited EPSG

please exclude deprecated epsg - https://apps.epsg.org/api/v1/CoordSystem/?includeDeprecated=false

NTaherifar commented 6 months ago

I made a change in the schema, adding two fields for EPSG: EPSG_code for the code and EPSG for the descriptive text. The code will not be displayed to the user. @kitchenprinzessin3880

kitchenprinzessin3880 commented 6 months ago

@NTaherifar it takes long to load the relevant epsg in the dropdown menu (compared to FoR and GCMD keywords), any idea?

NTaherifar commented 6 months ago

Firstly, the EPSG, compared to FoR and GCMD keywords, uses different APIs. Moreover, the API doesn't support direct filtering for 'geographic 2D' or 'compound' types, so needs additional post-processing. To somewhat mitigate this, I've increased the pageSize from 20 to 50, which has slightly improved the situation.

kitchenprinzessin3880 commented 6 months ago

@NTaherifar are you suing keywords parameter in the API query? https://apps.epsg.org/api/v1/CoordRefSystem/?includeDeprecated=false&keywords=

NTaherifar commented 6 months ago

@kitchenprinzessin3880 Yes, it is. But the keywords can not be used to filter the types 'geographic 2D' or 'compound'.