OpenGeoscience / geojs

High-performance visualization and interactive data exploration of scientific and geospatial location aware datasets
https://opengeoscience.github.io/geojs
Apache License 2.0
433 stars 75 forks source link

Create an example to show loading of a geotif #187

Closed aashish24 closed 6 years ago

pvskarthikeya commented 7 years ago

Hey! Is this still available. Can I do it?

aashish24 commented 7 years ago

dear @pvskarthikeya not in pure client-side code, but if you are willing to use python code, we have some examples. @jbeezley do we have any small-code example?

jbeezley commented 7 years ago

There are two components to this:

  1. Serve a GeoTIFF as png or jpg. This could either be done using something like geoserver, or you could use GDAL to do the conversion offline.
  2. Display the image as a quad feature. There is an example for how to do this here. You will need the url to the image and the coordinates of corners to instantiate it. Alternatively if you use geoserver, the image can be displayed as a WMS layer as in this example.
aashish24 commented 7 years ago

@pvskarthikeya another option I want to mention is that if you have a geotiff, its very easy to run sample app from here (https://github.com/OpenGeoscience/ktile) that servers geotiff as tiles. Look at the example here: https://github.com/OpenGeoscience/KTile/tree/master/examples/geotiff

pvskarthikeya commented 7 years ago

Okay. @aashish24. Sorry If I get this wrong. I have never worked with GeoTIFF format. So, here my task is to write a Python Script to serve that image as a png or jpg mapped on top of a map using the coordinates from the image. I have never done this kind of work before. So do you think, I can still so this?

aashish24 commented 7 years ago

@pvskarthikeya yes if you know python then we can help. Just look at this code here: https://github.com/OpenGeoscience/KTile/blob/master/examples/geotiff/server.py

If you can install ktile and have the examples working, then I can help with the next step.

pvskarthikeya commented 7 years ago

@aashish24 Yup. Was able to run the example. http://localhost:8080/geotiff/0/0/0.png shows the following image. Dont know if this is the expected output. screen shot 2016-10-13 at 12 09 55 am

aashish24 commented 7 years ago

@pvskarthikeya seems okay was the image white? Once you have this up and running you can point geojs to use the base URL for the layer

pvskarthikeya commented 7 years ago

@aashish24 HI! yes it was white. Sorry could not reply earlier. I will try to figure this out as soon as possible. Thank you.

aashish24 commented 7 years ago

@pvskarthikeya are you still interested in finishing this? Thanks

manthey commented 6 years ago

This was added to the Girder large_image plugin via https://github.com/girder/large_image/pull/237. See the geojs viewer in large_image for the implementation.