RE: [mapserver-users] elevation profile
Thanks Puneet. Very nice looking app. -Original Message- From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Mr. Puneet Kishor Sent: Saturday, May 05, 2012 1:15 PM To: mapserver Subject: Re: [mapserver-users] elevation profile The elevation profile widget is finally implemented at http://earth-base.org/geomaps Click on the fourth button from the top on the left, then draw a line on the map to see the profile. As with all my apps, the values themselves can be retrieved by querying for them directly from the browser or from the command line. For example http://earth-base.org/geomaps/elevation.json?linestring=LINESTRING(-118.706+37.933%2C-109.477+42.494) This one is dedicated to Steve Woodbridge, Brent Wood and David Fawcett. .. -- Puneet Kishor___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] elevation profile
Puneet, very nice - well done. cheers Ben On 07/05/2012, at 12:00 AM, Mr. Puneet Kishor punk.k...@gmail.com wrote: The elevation profile widget is finally implemented at http://earth-base.org/geomaps Click on the fourth button from the top on the left, then draw a line on the map to see the profile. As with all my apps, the values themselves can be retrieved by querying for them directly from the browser or from the command line. For example http://earth-base.org/geomaps/elevation.json?linestring=LINESTRING(-118.706+37.933%2C-109.477+42.494) This one is dedicated to Steve Woodbridge, Brent Wood and David Fawcett. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] elevation profile
The elevation profile widget is finally implemented at http://earth-base.org/geomaps Click on the fourth button from the top on the left, then draw a line on the map to see the profile. As with all my apps, the values themselves can be retrieved by querying for them directly from the browser or from the command line. For example http://earth-base.org/geomaps/elevation.json?linestring=LINESTRING(-118.706+37.933%2C-109.477+42.494) This one is dedicated to Steve Woodbridge, Brent Wood and David Fawcett. .. -- Puneet Kishor___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] elevation profile
Hi Puneet I suggest you use GMT - the best open source cartographic grid analysis tool available! http://gmt.soest.hawaii.edu you may need your SRTM surface as a GMT netCDF grid, which GDAL supports nicely, or you may be able to describe your SRTM grid for GMT to use natively - I'm not sure the project command will generate your line, with sample points along it as straight or great circle lines between end points grdtrack will turn your XY line coordinates into xyz values, with the Z values derived from your SRTM grid psxy will gernerate a nicely annotated graphic (postscript) showing your profile psxyz can (alternatively) render your profile in 3d space (overlaid on a 3D perspective view of the surface if required) ps2raster will convert to a raster image such as png. This can easily be wrapped up in a cgi if required. Cheers, Brent Wood --- On Fri, 4/27/12, Puneet Kishor punk.k...@gmail.com wrote: From: Puneet Kishor punk.k...@gmail.com Subject: Re: [mapserver-users] elevation profile To: Stephen Woodbridge wood...@swoodbridge.com Cc: mapserver-users@lists.osgeo.org Date: Friday, April 27, 2012, 2:49 PM On Apr 26, 2012, at 7:20 PM, Stephen Woodbridge wrote: On 4/26/2012 7:35 PM, Puneet Kishor wrote: Any suggestions on how something like this could be implemented using MapServer? http://viewer.nationalmap.gov/example/elevation_profile.html My front-end is OpenLayers, and the backend data are from SRTM. I'd like to click on the map and create a line, and get back the elevation numbers for that line. I only want the elevation numbers as I can optionally construct the profile via a variety of ways. I am assuming I could send a line WKT, but how would I query for the values using MapServer? Fwiw, http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/elevationCanvas.html seems to use a canvas implementation that doesn't seem to be available in my standard-issue OL 2.11. Calling `this.layer.getPixelDataForViewPortPx` croaks with not a function message. In any case, I don't really want the RGB values under the mouse. I want the actual height values. Thanks in advance for any suggestions, Hi Puneet, I have done this in the past and there are a bunch of moving parts. Here is what I did. 1. got a copy of NED2 data for the US. 2. create a gdal .vrt file to pull all the files into a single virtual file 3. wrote a simple C fcgi program to take an x,y and get the elevation from the the NED2 data. http://imaptools.com:8080/cgi-bin/getElevation.fcgi?lat=32.6628646lon=-86.8800962 4. I used pgRouting to compute a route and then took the route geometry and added sample point along the edges where needed, and hit the fcgi service to convert the points to elevations and then plotted the elevations against the their length along the line that the x,y represented. I also think I may have wrote an app where you could pass the route polyline to it an it would generate an image of the elevation plot. 5. Then wired it into the web page as an ajax call of as a image url that gets updated. Thanks for the details, Steve. All this is way more complicated that I was envisioning. And, PostGIS 2 is out of the question, for now, at least. Could you send me that gdal .vrt file? I'd like to look at it. Perhaps that will give me some other ideas on how to approach this. Many thanks, -- Puneet Kishor ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] elevation profile
Any suggestions on how something like this could be implemented using MapServer? http://viewer.nationalmap.gov/example/elevation_profile.html My front-end is OpenLayers, and the backend data are from SRTM. I'd like to click on the map and create a line, and get back the elevation numbers for that line. I only want the elevation numbers as I can optionally construct the profile via a variety of ways. I am assuming I could send a line WKT, but how would I query for the values using MapServer? Fwiw, http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/elevationCanvas.html seems to use a canvas implementation that doesn't seem to be available in my standard-issue OL 2.11. Calling `this.layer.getPixelDataForViewPortPx` croaks with not a function message. In any case, I don't really want the RGB values under the mouse. I want the actual height values. Thanks in advance for any suggestions, -- Puneet Kishor___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] elevation profile
On 4/26/2012 7:35 PM, Puneet Kishor wrote: Any suggestions on how something like this could be implemented using MapServer? http://viewer.nationalmap.gov/example/elevation_profile.html My front-end is OpenLayers, and the backend data are from SRTM. I'd like to click on the map and create a line, and get back the elevation numbers for that line. I only want the elevation numbers as I can optionally construct the profile via a variety of ways. I am assuming I could send a line WKT, but how would I query for the values using MapServer? Fwiw, http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/elevationCanvas.html seems to use a canvas implementation that doesn't seem to be available in my standard-issue OL 2.11. Calling `this.layer.getPixelDataForViewPortPx` croaks with not a function message. In any case, I don't really want the RGB values under the mouse. I want the actual height values. Thanks in advance for any suggestions, Hi Puneet, I have done this in the past and there are a bunch of moving parts. Here is what I did. 1. got a copy of NED2 data for the US. 2. create a gdal .vrt file to pull all the files into a single virtual file 3. wrote a simple C fcgi program to take an x,y and get the elevation from the the NED2 data. http://imaptools.com:8080/cgi-bin/getElevation.fcgi?lat=32.6628646lon=-86.8800962 4. I used pgRouting to compute a route and then took the route geometry and added sample point along the edges where needed, and hit the fcgi service to convert the points to elevations and then plotted the elevations against the their length along the line that the x,y represented. I also think I may have wrote an app where you could pass the route polyline to it an it would generate an image of the elevation plot. 5. Then wired it into the web page as an ajax call of as a image url that gets updated. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] elevation profile
Oh, one more point I wanted to mention is that the new PostGIS raster code might let you load the NED2 data directly into the database and get the contour information via a SQL query. But I have not try to do that yet. -Steve W On 4/26/2012 8:20 PM, Stephen Woodbridge wrote: On 4/26/2012 7:35 PM, Puneet Kishor wrote: Any suggestions on how something like this could be implemented using MapServer? http://viewer.nationalmap.gov/example/elevation_profile.html My front-end is OpenLayers, and the backend data are from SRTM. I'd like to click on the map and create a line, and get back the elevation numbers for that line. I only want the elevation numbers as I can optionally construct the profile via a variety of ways. I am assuming I could send a line WKT, but how would I query for the values using MapServer? Fwiw, http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/elevationCanvas.html seems to use a canvas implementation that doesn't seem to be available in my standard-issue OL 2.11. Calling `this.layer.getPixelDataForViewPortPx` croaks with not a function message. In any case, I don't really want the RGB values under the mouse. I want the actual height values. Thanks in advance for any suggestions, Hi Puneet, I have done this in the past and there are a bunch of moving parts. Here is what I did. 1. got a copy of NED2 data for the US. 2. create a gdal .vrt file to pull all the files into a single virtual file 3. wrote a simple C fcgi program to take an x,y and get the elevation from the the NED2 data. http://imaptools.com:8080/cgi-bin/getElevation.fcgi?lat=32.6628646lon=-86.8800962 4. I used pgRouting to compute a route and then took the route geometry and added sample point along the edges where needed, and hit the fcgi service to convert the points to elevations and then plotted the elevations against the their length along the line that the x,y represented. I also think I may have wrote an app where you could pass the route polyline to it an it would generate an image of the elevation plot. 5. Then wired it into the web page as an ajax call of as a image url that gets updated. -Steve W ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] elevation profile
On Apr 26, 2012, at 7:20 PM, Stephen Woodbridge wrote: On 4/26/2012 7:35 PM, Puneet Kishor wrote: Any suggestions on how something like this could be implemented using MapServer? http://viewer.nationalmap.gov/example/elevation_profile.html My front-end is OpenLayers, and the backend data are from SRTM. I'd like to click on the map and create a line, and get back the elevation numbers for that line. I only want the elevation numbers as I can optionally construct the profile via a variety of ways. I am assuming I could send a line WKT, but how would I query for the values using MapServer? Fwiw, http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/elevationCanvas.html seems to use a canvas implementation that doesn't seem to be available in my standard-issue OL 2.11. Calling `this.layer.getPixelDataForViewPortPx` croaks with not a function message. In any case, I don't really want the RGB values under the mouse. I want the actual height values. Thanks in advance for any suggestions, Hi Puneet, I have done this in the past and there are a bunch of moving parts. Here is what I did. 1. got a copy of NED2 data for the US. 2. create a gdal .vrt file to pull all the files into a single virtual file 3. wrote a simple C fcgi program to take an x,y and get the elevation from the the NED2 data. http://imaptools.com:8080/cgi-bin/getElevation.fcgi?lat=32.6628646lon=-86.8800962 4. I used pgRouting to compute a route and then took the route geometry and added sample point along the edges where needed, and hit the fcgi service to convert the points to elevations and then plotted the elevations against the their length along the line that the x,y represented. I also think I may have wrote an app where you could pass the route polyline to it an it would generate an image of the elevation plot. 5. Then wired it into the web page as an ajax call of as a image url that gets updated. Thanks for the details, Steve. All this is way more complicated that I was envisioning. And, PostGIS 2 is out of the question, for now, at least. Could you send me that gdal .vrt file? I'd like to look at it. Perhaps that will give me some other ideas on how to approach this. Many thanks, -- Puneet Kishor ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] elevation profile
On 4/26/2012 10:49 PM, Puneet Kishor wrote: On Apr 26, 2012, at 7:20 PM, Stephen Woodbridge wrote: On 4/26/2012 7:35 PM, Puneet Kishor wrote: Any suggestions on how something like this could be implemented using MapServer? http://viewer.nationalmap.gov/example/elevation_profile.html My front-end is OpenLayers, and the backend data are from SRTM. I'd like to click on the map and create a line, and get back the elevation numbers for that line. I only want the elevation numbers as I can optionally construct the profile via a variety of ways. I am assuming I could send a line WKT, but how would I query for the values using MapServer? Fwiw, http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/elevationCanvas.html seems to use a canvas implementation that doesn't seem to be available in my standard-issue OL 2.11. Calling `this.layer.getPixelDataForViewPortPx` croaks with not a function message. In any case, I don't really want the RGB values under the mouse. I want the actual height values. Thanks in advance for any suggestions, Hi Puneet, I have done this in the past and there are a bunch of moving parts. Here is what I did. 1. got a copy of NED2 data for the US. 2. create a gdal .vrt file to pull all the files into a single virtual file 3. wrote a simple C fcgi program to take an x,y and get the elevation from the the NED2 data. http://imaptools.com:8080/cgi-bin/getElevation.fcgi?lat=32.6628646lon=-86.8800962 4. I used pgRouting to compute a route and then took the route geometry and added sample point along the edges where needed, and hit the fcgi service to convert the points to elevations and then plotted the elevations against the their length along the line that the x,y represented. I also think I may have wrote an app where you could pass the route polyline to it an it would generate an image of the elevation plot. 5. Then wired it into the web page as an ajax call of as a image url that gets updated. Thanks for the details, Steve. All this is way more complicated that I was envisioning. And, PostGIS 2 is out of the question, for now, at least. Could you send me that gdal .vrt file? I'd like to look at it. Perhaps that will give me some other ideas on how to approach this. Puneet, GDAL has a utility gdalbuildvrt the creates the .vrt file I think I ran it something like: gdalbuildvrt ned2.vrt /u/data/ned2/*.tif run gdalbuildvrt with no arguments to get some help. If you want you could use mapserver and set up a point query against the ned2 data to get the elevation, then write a php wrapper to take the polyline and sample it and call mapserver to get the elevations along the polyline and you the php gd code to plot it out. -Steve ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users