Skip to content

Commit

Permalink
proj: EPSG code source: replace epsg.io with spatialreference.org
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.
  • Loading branch information
neteler committed Oct 16, 2024
1 parent 2415894 commit 21beac9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions gui/wxpython/location_wizard/wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -1604,9 +1604,12 @@ def __init__(self, wizard, parent):
self, data=None, columns=[_("Code"), _("Description"), _("Parameters")]
)

# epsg.io hyperlink
# spatialreference.org hyperlink
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 @@ -1688,14 +1691,16 @@ 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(
str("https://spatialreference.org/ref/epsg/?q={0}/".format(value))
)
data = self.epsglist.Search(index=[0, 1, 2], pattern=value, firstOnly=False)
if data:
index = 0
Expand Down
4 changes: 2 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,4 @@ <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)

0 comments on commit 21beac9

Please sign in to comment.