Skip to content

Commit

Permalink
GUI: EPSG code source: replace epsg.io with spatialreference.org (#4535)
Browse files Browse the repository at this point in the history
As epsg.io is partially outdated (see [source](maptiler/epsg.io#171) and related) and PROJ is our engine anyway, this PR switches the references in the GUI to https://spatialreference.org.

* "See also" section: added URLs to CRS Explorer and EPSG Geodetic Parameter Dataset

Co-authored-by: Vaclav Petras <wenzeslaus@gmail.com>
  • Loading branch information
neteler and wenzeslaus committed Oct 17, 2024
1 parent a131a80 commit fc478d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
11 changes: 7 additions & 4 deletions gui/wxpython/location_wizard/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1616,9 +1616,12 @@ def __init__(self, wizard, parent):
self, data=None, columns=[_("Code"), _("Description"), _("Parameters")]
)

# epsg.io hyperlink
# A hyperlink to a CRS database (PROJ related)
self.tlink = HyperlinkCtrl(
self, id=wx.ID_ANY, label="epsg.io", url="https://epsg.io/"
self,
id=wx.ID_ANY,
label="spatialreference.org",
url="https://spatialreference.org/",
)
self.tlink.SetNormalColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT))
self.tlink.SetVisitedColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_GRAYTEXT))
Expand Down Expand Up @@ -1701,14 +1704,14 @@ def EnableNext(self, enable=True):
def OnTextChange(self, event):
value = self.searchb.GetValue()
if value == "":
self.tlink.SetURL("https://epsg.io/")
self.tlink.SetURL("https://spatialreference.org/")
self.epsgcode = None
self.epsgdesc = self.epsgparams = ""
self.searchb.ChangeValue("")
self.OnBrowseCodes(None)
self.EnableNext(False)
else:
self.tlink.SetURL(str("https://epsg.io/?q={0}".format(value)))
self.tlink.SetURL(f"https://spatialreference.org/ref/?&search={value}")
data = self.epsglist.Search(index=[0, 1, 2], pattern=value, firstOnly=False)
if data:
index = 0
Expand Down
6 changes: 4 additions & 2 deletions lib/init/helptext.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ <h2>GRASS started in the default project, now what?</h2>
<h3>Creating a New project with the Project Wizard</h3>
<p>
If you know the CRS of your data or study area,
you can fill <a href="https://epsg.io">EPSG code</a>
you can fill <a href="https://spatialreference.org/">EPSG code</a>
or description and Project Wizard finds appropriate CRS from a predefined list
of projections.

Expand Down Expand Up @@ -97,4 +97,6 @@ <h2>See also</h2>
</em>

<p>
<a href="https://epsg.io/">List of EPSG codes</a> (Database of worldwide coordinate systems)
<a href="https://spatialreference.org/">List of EPSG codes</a> (Database of worldwide coordinate systems),
<a href="https://crs-explorer.proj.org/">CRS Explorer - PROJ codes</a>, and
<a href="https://epsg.org/">EPSG Geodetic Parameter Dataset</a>

0 comments on commit fc478d0

Please sign in to comment.