On Sun, Aug 23, 2009 at 11:11 AM, Simon
Slavin<slav...@hearsay.demon.co.uk> wrote:
>
> On 23 Aug 2009, at 5:00pm, P Kishor wrote:
>
>> WHERE a*x - y + c = 0
>
> Here's the problem.  This works only when the equation is exact.

Indeed. We already laid out those presumptions. One, your height
coverage has to be continuous as you can get via an image. Two, you
can substitute any equation for your line, however, any complex line
can be broken up into segments of simple, straight lines. All GIS
software do just that. Once you can solve the problem for a simple
segment, you can repeat the solution for every segment in the line.

Postgis/Spatialite by themselves won't solve the problem, but they may
have (don't know about Spatialite, but Postgis has a boatload of
geographic functions created by the developers) ready made functions
that can help build the solution.

A really nice application would allow the user to click, click, click
a line (of many segments) on a representation of a terrain, go
retrieve the height values, and construct an image of the elevation
profile.


> Which
> under normal circumstances means that all the numbers fit neatly with some
> imaginary integer formula.  This isn't how real life works, especially when
> you've correctly noted that your measured heights weren't measured at
> exactly regular intervals.
>
> You're going to have to do some proper programming.  For example, how to
> interpolate the height at an arbitrary position when you have a collection
> of heights measured nearby.  There's no easy solution and you certainly
> can't do the majority of the work inside a SQL query.
>
> Simon.
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, WI, United States
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to