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

Show alternate EPSG: names for the coordinate reference system #552

Open
1 task done
Raruto opened this issue May 18, 2023 · 3 comments
Open
1 task done

Show alternate EPSG: names for the coordinate reference system #552

Raruto opened this issue May 18, 2023 · 3 comments
Assignees
Labels
feature New feature or request

Comments

@Raruto
Copy link
Contributor

Raruto commented May 18, 2023

Checklist

  • I've searched through the current issues to make sure this feature hasn't been requested already.

Motivation

EPSG strings are hard to remember..

For example, here's what to currently look for for a user who remembers familiar with Web Mercator (WSG84) but will never remember the EPSG code.

image

Suggested solution

On QGIS desktop it is currently displayed like this

image

So, lets check if through QGIS server it is possible to concatenate the releated WGS string within the SRID select (ref: above group-creation-page).

Alternatives considered

No response

@Raruto Raruto added the feature New feature or request label May 18, 2023
@wlorenzetti
Copy link
Member

@Raruto Believe me it's easier to recode the code than the full name of the CRS :)

@Raruto
Copy link
Contributor Author

Raruto commented May 22, 2023

I meant, show different name on frontend side only (within that <form>).

So to speak, something like this: 👉 https://jsfiddle.net/6dco0qws/

<label for="srid">Choose your SRID:</label>

<select id="srid">

  <option value="EPSG:4326">EPSG:4326 - WSG84</option>
  <option value="EPSG:3857">EPSG:3857 - WSG84 / Pseudo Mercator</option>

</select>

where individual options labels are constructed roughly like this:

if srid.startswith('EPSG:'): # <-- superfluous condition?
    
    crs = QgsCoordinateReferenceSystem(srid)
    
    if crs.isValid():
        print("<option value="{}">{} - {}</option>".format(srid, srid, crs.description()))

For more info:

@wlorenzetti
Copy link
Member

Ok I understood, but at the moment the CRS lists is generated from this model :

class G3WSpatialRefSys(models.Model):

It's a place to refactor and just use the QGIS API to get the list of SRIDs.

@Raruto Raruto mentioned this issue Oct 5, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants