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

Height and Width values should not be constant in GetMap request (OGC webservices info on views' metadata) #1025

Open
antobenve opened this issue Oct 18, 2024 · 0 comments

Comments

@antobenve
Copy link
Collaborator

antobenve commented Oct 18, 2024

Related to #887

The URL of the WMS GetMap request displayed in the OGC webservices module of the metadata of vector views has constant height and width = 512. The width and height of the resulting images are generally not proportioned which makes the image distorted.
A solid way to determine the value of height and width should be based on the ratio between the extent of latitude and of longitude:

ΔY = ymax- ymin
ΔX = xmax - xmin 
Ratio = ΔX / ΔY
Height = 512
Width = 512 * Ratio

Example view Exclusive Economic Zone (EEZ) (200 Nautical Mile Limit):

ymin:-85.5625
xmin: -180
ymax: 86.99401092529297
xmax: 180

ΔY = 86.99401092529297 - -85.5625 = 172.55651092529297
ΔX = 180 - -180 = 360
Ratio = 360 / 172.55651092529297 = 2.0862
Height = 512 
Width = 512 * 2.0862 = 1’068

Old GetMap request (WIDTH=512&HEIGHT=512)

New GetMap request (WIDTH=1068&HEIGHT=512)

@antobenve antobenve changed the title OGC webservices info on views' metadata Height and Width values should not be constant in GetMap request (OGC webservices info on views' metadata) Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant