[postgis-users] Get point distance and bearing from known point.

2011-05-30 Thread Eric Sepich
I need a function that gets a point a distance and bearing from a known
point on the WGS84 datumn. If postgis has such a function I think I will
start using it! I checked the reference manual but my limited knowledge of
postgis at this point is not doing me well.

Thank you!
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] PHP & PostGIS.

2011-06-26 Thread Eric Sepich


I get one row returned but I just don't seem to have any kind of
documentation on what to do with it. I want to list the coordinates of the
polygon returned by my query. Does anyone know how to do that?

Thank you,
Eric S.
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] PHP & PostGIS.

2011-06-26 Thread Eric Sepich
Works great! Thanks for the insight.

On Sun, Jun 26, 2011 at 9:33 PM, Stephen Woodbridge  wrote:

> On 6/27/2011 12:31 AM, Stephen Woodbridge wrote:
>
>> On 6/27/2011 12:28 AM, Eric Sepich wrote:
>>
>>> >> $dbconn = pg_connect("host=localhost port=5432 dbname=postgismethane
>>> user=root password=excedrin413");
>>>
>>> $query = "SELECT * FROM polygons WHERE gid = 1";
>>> $result = pg_exec($dbconn, $query);
>>> if (!$result) {printf ("ERROR"); exit;}
>>> $numrows = pg_numrows($result);
>>> ?>
>>>
>>> I get one row returned but I just don't seem to have any kind of
>>> documentation on what to do with it. I want to list the coordinates of
>>> the polygon returned by my query. Does anyone know how to do that?
>>>
>>
>> Try something like this:
>>
>>
>> > $dbconn = pg_connect("host=localhost port=5432 dbname=postgismethane
>> user=root password=excedrin413");
>>
>> $query = "SELECT * FROM polygons WHERE gid = 1";
>>
>
> Ooops, meant to change this to:
>
>  $query = "SELECT *, astext(the_geom) FROM polygons WHERE gid = 1";
>
>
>  $r = pg_exec($dbconn, $query);
>> if (!$r) {printf ("ERROR"); exit;}
>>
>> $n = pg_num_rows($r);
>> for ($i=0; $i<$n; $i++) {
>> printf("- Row: %d ---\n", $i);
>> $row = pg_fetch_assoc($r);
>> pg_free_result($r);
>> foreach ($row as $k=>$v)
>> printf("%20s = %s\n", $k, $v);
>> }
>> pg_close($dbh);
>> ?>
>> __**_
>> postgis-users mailing list
>> postgis-users@postgis.**refractions.net
>> http://postgis.refractions.**net/mailman/listinfo/postgis-**users<http://postgis.refractions.net/mailman/listinfo/postgis-users>
>>
>
> __**_
> postgis-users mailing list
> postgis-users@postgis.**refractions.net
> http://postgis.refractions.**net/mailman/listinfo/postgis-**users<http://postgis.refractions.net/mailman/listinfo/postgis-users>
>
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users