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

[Bug] Replace wms server in r.out.vtk example #4844

Open
echoix opened this issue Dec 15, 2024 · 7 comments · May be fixed by #4897
Open

[Bug] Replace wms server in r.out.vtk example #4844

echoix opened this issue Dec 15, 2024 · 7 comments · May be fixed by #4897
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@echoix
Copy link
Member

echoix commented Dec 15, 2024

Describe the bug

The example here uses a dead WMS server.

<div class="code"><pre>
#set the region
g.region n=4926990 s=4914840 w=591570 e=607800 res=30 -p
# using r.in.wms to create RGB data to get a satellite coverage
r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi \
output=wms_global_mosaic
# export the data to VTK
r.out.vtk rgbmaps=wms_global_mosaic.red,wms_global_mosaic.green,wms_global_mosaic.blue \
elevation=elevation.10m output=/tmp/out.vtk
# visualize in Paraview or other VTK viewer:
paraview --data=/tmp/out.vtk
</pre></div>

Expected behavior

Docs replaced with a working example.

I think the closest I got to the current web servers are listed here https://nasa-gibs.github.io/gibs-api-docs/access-basics/#ogc-web-map-service-wms

Other

Other links:
https://www.earthdata.nasa.gov/engage/open-data-services-software/earthdata-developer-portal/gibs-api
https://neo.gsfc.nasa.gov/about/wms.php
https://web.archive.org/web/20090703225229/http://wms.jpl.nasa.gov/wms.cgi

@echoix echoix added the bug Something isn't working label Dec 15, 2024
@veroandreo veroandreo added the good first issue Good for newcomers label Dec 16, 2024
@rohannallamadge
Copy link
Contributor

"I'm trying to replace a dead WMS server in a GRASS GIS example. The options I have are:

Geographic (EPSG:4326)
NSIDC Sea Ice Polar Stereographic North (EPSG:3413)
Antarctic Polar Stereographic (EPSG:3031)
Web Mercator (EPSG:3857)
Which one would be the best choice for a general-purpose example, and why?"

@rohannallamadge
Copy link
Contributor

sir @echoix ,
Which layer should I use for the WMS server

@echoix
Copy link
Member Author

echoix commented Dec 17, 2024

"I'm trying to replace a dead WMS server in a GRASS GIS example. The options I have are:

Geographic (EPSG:4326)

NSIDC Sea Ice Polar Stereographic North (EPSG:3413)

Antarctic Polar Stereographic (EPSG:3031)

Web Mercator (EPSG:3857)

Which one would be the best choice for a general-purpose example, and why?"

I would consider the EPSG:3857 (web Mercator) more general purpose, as it would look nice pretty much everywhere, that's why it's used in stuff like Google maps, even though it isn't a great choice for official usages due to its limitations.

Geographic too applies everywhere, but doesn't look as nice, as plotting the geographic coordinates (lat long) directly makes a distorted map.

Antarctic Polar Stereographic would probably be a good choice only for the region it applies to.

@echoix
Copy link
Member Author

echoix commented Dec 17, 2024

sir @echoix ,

Which layer should I use for the WMS server

Since I have no idea what the example looked like before with the working server, I think that if you choose an interesting one and location, and doing the screenshots with it and adapting the example for it, it would be fine. We'll let others here double check it was used properly and shows the correct usages of the module before merging.

@rohannallamadge
Copy link
Contributor

Sorry for the delayed response—I had exams at my college and couldn't get back sooner.
1]Set the Region:
g.region n=7000000 s=5000000 w=-1000000 e=2000000 res=1000 -p
2]Fetch RGB Data from WMS Server:
r.in.wms layers=BlueMarble_ShadedRelief_Bathymetry
uri=https://gibs.earthdata.nasa.gov/wms/epsg3857/best/wms.cgi?
output=wms_blue_marble
and projection i have used is Web Mercator - EPSG:3857
image

3]Export Data to VTK Format:
r.out.vtk rgbmaps=wms_blue_marble.red,wms_blue_marble.green,wms_blue_marble.blue \ elevation=elevation.10m output=/tmp/out.vtk
image

I also incorporated slope_10@permanent to further enhance the analysis

image

Please suggest if there are any specific adjustments or additional features you'd like me to implement to enhance the example further

@neteler neteler added this to the 8.5.0 milestone Dec 28, 2024
@DevalGarg129
Copy link

Describe the bug

The example here uses a dead WMS server.

<div class="code"><pre>
#set the region
g.region n=4926990 s=4914840 w=591570 e=607800 res=30 -p
# using r.in.wms to create RGB data to get a satellite coverage
r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi \
output=wms_global_mosaic
# export the data to VTK
r.out.vtk rgbmaps=wms_global_mosaic.red,wms_global_mosaic.green,wms_global_mosaic.blue \
elevation=elevation.10m output=/tmp/out.vtk
# visualize in Paraview or other VTK viewer:
paraview --data=/tmp/out.vtk
</pre></div>

Expected behavior

Docs replaced with a working example.

I think the closest I got to the current web servers are listed here https://nasa-gibs.github.io/gibs-api-docs/access-basics/#ogc-web-map-service-wms

Other

Other links: https://www.earthdata.nasa.gov/engage/open-data-services-software/earthdata-developer-portal/gibs-api https://neo.gsfc.nasa.gov/about/wms.php https://web.archive.org/web/20090703225229/http://wms.jpl.nasa.gov/wms.cgi

@DevalGarg129
Copy link

Set the region

g.region n=4926990 s=4914840 w=591570 e=607800 res=30 -p

Using r.in.wms to create RGB data to get a satellite coverage

r.in.wms layers=global_mosaic mapserver=https://gibs.earthdata.nasa.gov/wms/epsg4326/best
output=wms_global_mosaic

Export the data to VTK

r.out.vtk rgbmaps=wms_global_mosaic.red,wms_global_mosaic.green,wms_global_mosaic.blue
elevation=elevation.10m output=/tmp/out.vtk

Visualize in Paraview or other VTK viewer:

paraview --data=/tmp/out.vtk

To replace the WMS server in the r.in.wms example within the code snippet, you can substitute the mapserver URL with a different valid WMS server URL. For instance, you can use a server like NASA's GIBS (Global Imagery Browse Services) or any other relevant WMS server that provides data for your use case.

@petrasovaa petrasovaa linked a pull request Dec 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
5 participants