How is the LookAt parameter generated for KML files? I’m interested in how the Range setting is generated.
n
Marc Pfister
Geospatial Data Manager
ENPLAN
mpfister@anonymised.com
530/221-0440 x108
530/221-6963 Fax
How is the LookAt parameter generated for KML files? I’m interested in how the Range setting is generated.
n
Marc Pfister
Geospatial Data Manager
ENPLAN
mpfister@anonymised.com
530/221-0440 x108
530/221-6963 Fax
Hi Marc,
The coordinate is generated from the centroid of the geometry being encoded. The range parameter is currently hardcoded to the value "700".
I am not the original author so I am not sure what else would make sense here. Perhaps deriving it some other way or allowing it to be user configurable.
Thoughts?
-Justin
Marc Pfister wrote:
How is the LookAt parameter generated for KML files? I’m interested in how the Range setting is generated.
n
Marc Pfister
Geospatial Data Manager
ENPLAN
mpfister@anonymised.com
530/221-0440 x108
530/221-6963 Fax!DSPAM:4007,46410cc5197481012714783!
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/!DSPAM:4007,46410cc5197481012714783!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users!DSPAM:4007,46410cc5197481012714783!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Marc
Pfister
How is the LookAt parameter generated for KML files? I'm interested in
how the Range setting is generated.
Answering my own question, I dove into the source and found that the
LookAt section of KML has hardcoded parameters, namely a tilt and
heading of 10 and a range of 700.
Is it possible to get the bounding box of the returned geometry, then
write an appropriate range value to get the KML to be reasonably zoomed
in to the returned feature(s)?
Marc Pfister wrote:
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Marc
PfisterHow is the LookAt parameter generated for KML files? I'm interested in
how the Range setting is generated.
Answering my own question, I dove into the source and found that the
LookAt section of KML has hardcoded parameters, namely a tilt and
heading of 10 and a range of 700.
I guess you never got my reply :).
Is it possible to get the bounding box of the returned geometry, then
write an appropriate range value to get the KML to be reasonably zoomed
in to the returned feature(s)?
The bounding box is definitely available. So how would you calculate the range based on the bounds? Apologies if i am missing something obvious.
-Justin
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users!DSPAM:4007,46422fb876901431913854!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
I think it would depend on the size of their window (the view of the
earth) and their resolution etc. You would then have to build a
viewing frustum to get the appropriate range.
I don't think it would be something easy to put in.
Possibly a guess at the range might work. Build up a 'pyramid' with 45
degree angles based on the bbox of the geometry, then get the height;
that would be your range.
On 5/9/07, Justin Deoliveira <jdeolive@anonymised.com> wrote:
Marc Pfister wrote:
> From: geoserver-users-bounces@lists.sourceforge.net
> [mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Marc
> Pfister
>
>> How is the LookAt parameter generated for KML files? I'm interested in
> how the Range setting is generated.
>
> Answering my own question, I dove into the source and found that the
> LookAt section of KML has hardcoded parameters, namely a tilt and
> heading of 10 and a range of 700.
I guess you never got my reply :).
>
> Is it possible to get the bounding box of the returned geometry, then
> write an appropriate range value to get the KML to be reasonably zoomed
> in to the returned feature(s)?The bounding box is definitely available. So how would you calculate the
range based on the bounds? Apologies if i am missing something obvious.-Justin
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:4007,46422fb876901431913854!
>--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Brent Owens
Brent Owens [mailto:brentowens@anonymised.com] wrote:
"I think it would depend on the size of their window (the view of the
earth) and their resolution etc. You would then have to build a
viewing frustum to get the appropriate range.
I don't think it would be something easy to put in.
Possibly a guess at the range might work. Build up a 'pyramid' with 45
degree angles based on the bbox of the geometry, then get the height;
that would be your range."
Yeah, I figured that to get an exact range could get pretty ugly. Though
you could simplify things by hardcoding the tilt and bearing and then
shooting for something close using simple geometry like you mentioned.
However, just messing around it appears that if you just leave out the
LookAt section, GE will zoom to the appropriate bounds using a tilt and
bearing of 0, which works just fine for my purposes.