landsat background to the static renderer

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

landsat background to the static renderer

stevec-4
Hello,

Trying desperately to do a feature-a-day, there is now a landsat
backdrop to the static image. Courtesy of nasa and a few bits of java
and javascript. Your browser gets the image straight from nasa, we don't
do local processing.

Its been tested on IE 6, Firefox, Safari, Konqueror. If someone with
Opera can report success it would be nice.

Enjoy!

have fun,

SteveC [hidden email] http://www.fractalus.com/steve/

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Nick Whitelegg-2
Hello Steve,

How did you grab the landsat - did you use the exact same URL I did in
osm-editor?

I say that as the data seems to be returned from NASA much quicker than in
osm-editor. Noticed you're using PNG rather than JPEG: did that cut the
file size significantly?

Thanks,
Nick


_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

stevec-4
* @ 15/07/05 12:03:34 PM [hidden email] wrote:
> Hello Steve,
>
> How did you grab the landsat - did you use the exact same URL I did in
> osm-editor?

Yep, with a bit of jiggery pokery to work out the bounding box. Have a
look in the html.

> I say that as the data seems to be returned from NASA much quicker than in
> osm-editor.

They have more money, servers and arn't rendering arbitrary vectors.

> Noticed you're using PNG rather than JPEG: did that cut the
> file size significantly?

Jpeg doesn't do transparency. The png is too big, I think. There is
probably a way to give cairo a clue as to the compression level but I
havn't looked...

have fun,

SteveC [hidden email] http://www.fractalus.com/steve/

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Petter Reinholdtsen
In reply to this post by stevec-4

[Steve Coast]
> Its been tested on IE 6, Firefox, Safari, Konqueror. If someone with
> Opera can report success it would be nice.

Very nice.  It works for me on Opera, and I keep Javascript turned
off. :)

What about the java applet, and the elevation lines from osm-editor?
Anyone working on integrating it there?


_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Nick Whitelegg-2
In reply to this post by stevec-4





SteveC <[hidden email]> on 15/07/2005 12:09:46



Hello Steve,

>> I say that as the data seems to be returned from NASA much quicker than
in
>> osm-editor.

>They have more money, servers and arn't rendering arbitrary vectors.

Sorry if I didn't make myself clear - osm-editor also grabs the data from
NASA over HTTP, so that feature's common, yet the trip from the OSM server
to NASA and back seems much quicker than the trip from osm-editor on my box
(over broadband) and back. Do you have a much faster connection than
standard 1Mbps broadband?

Nick





_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

stevec-4
* @ 15/07/05 12:26:20 PM [hidden email] wrote:
> Sorry if I didn't make myself clear - osm-editor also grabs the data from
> NASA over HTTP, so that feature's common, yet the trip from the OSM server
> to NASA and back seems much quicker than the trip from osm-editor on my box
> (over broadband) and back. Do you have a much faster connection than
> standard 1Mbps broadband?


There is no trip from the osm server to NASA, your browser goes to nasa
to get the image. So the speed of grabbing the image with your code
should be the same as your browser getting it.

Look in the html and you can see its just two images grabbed and
layered....

have fun,

SteveC [hidden email] http://www.fractalus.com/steve/

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Tom Carden
In reply to this post by Nick Whitelegg-2
Nick Whitelegg wrote:
> Sorry if I didn't make myself clear - osm-editor also grabs the data from
> NASA over HTTP, so that feature's common, yet the trip from the OSM server
> to NASA and back seems much quicker than the trip from osm-editor on my
> box
> (over broadband) and back. Do you have a much faster connection than
> standard 1Mbps broadband?
>

When you visit openstreetmap.org your browser fetches the satellite image
direct from NASA.  The OSM server's connection to NASA is irrelevant - there
isn't one.  If you look at the html, and search for nasa, you can see the
URL it uses.

Differences between your app's connection speed and your browser's
connection speed, assuming the same URLS, are probably due to the fact that
most browsers start rendering an image as soon as they get enough data to
show, whereas your app (I haven't looked) probably doesn't.

It also makes a difference what size image you ask for, and I assume the
time of day makes a difference too (though I haven't tested it).

Best,

Tom.



_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

Nick Whitelegg-2
In reply to this post by stevec-4




>Very nice.  It works for me on Opera, and I keep Javascript turned
>off. :)

>What about the java applet, and the elevation lines from osm-editor?
>Anyone working on integrating it there?

Well, Freemap displays contour lines. Originally they were generated on the
fly with PHP, but this was a little slow where there are a lot of contours
on the map. Now I pre-generate contour tiles from the NASA data and display
the appropriate one depending on the current location. The contour code
used in the pre-generation program is the same as that used in osm-editor
(C++ based). If contours were to be added to the OpenStreetMap interface,
that would probably be the way to go.


Nick





_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

Tom Carden
Nick Whitelegg wrote:

>
> Well, Freemap displays contour lines. Originally they were generated on
> the
> fly with PHP, but this was a little slow where there are a lot of contours
> on the map. Now I pre-generate contour tiles from the NASA data and
> display
> the appropriate one depending on the current location. The contour code
> used in the pre-generation program is the same as that used in osm-editor
> (C++ based). If contours were to be added to the OpenStreetMap interface,
> that would probably be the way to go.
>

IIRC Freemap uses OS grid references - I assume that's what you're using for
your tiles?

Any idea how to go about pre-rendering tiles for the entire globe?

Tom.



_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

Tom Carden
In reply to this post by Petter Reinholdtsen
>
> What about the java applet, and the elevation lines from osm-editor?
> Anyone working on integrating it there?
>

Street name annotation is a higher priority in the applet right now,  but
I'd certainly like it to look the same as the static renderer.  Rendering
arbitrary images from any mapserver should really be possible, starting with
landsat :)

Just wait for me to start grumbling about applet sandboxes...

If anyone has any particular ideas/requirements for how to store and display
street metadata, please let us know, we're working on that at the moment.

OSM: treading the fine line between reinventing the wheel and the simplest
possible thing that works.

Tom.



_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

Nick Whitelegg-2
In reply to this post by stevec-4





>IIRC Freemap uses OS grid references - I assume that's what you're using
for
>your tiles?

It does use grid refs, but it wouldn't be too hard to tweak the code to use
latitude and longitude instead.You wouldn't need to go deep into the
contour generation code, there's some setup code which specifies the tile.
At the moment this involves a conversion from gridrefs to lat/long and
back, since the SRTM data are in lat/long. It would be a case of removing
these conversions and then the whole thing would work lat/long.

I suppose I ought to abandon gridrefs totally but I've got too many other
things on the go at the moment .... :-)

Nick




_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

Tom Carden
"Nick Whitelegg" wrote:
>
> I suppose I ought to abandon gridrefs totally but I've got too many other
> things on the go at the moment .... :-)
>

Not really. It seems totally appropriate for your project, and your target
users.  Local grid systems would be a "nice to have" for openstreetmap
because of its global scope, but for a local/countryside mapping project
they're ideal.

Tom.


_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

stevec-4
In reply to this post by Tom Carden
* @ 15/07/05 12:44:15 PM [hidden email] wrote:
> OSM: treading the fine line between reinventing the wheel and the simplest
> possible thing that works.

a-men to that.

Anyone tried reading the WMS/WFS/WFS-T documentation? If not, walking
over hot coals might be more fun...

have fun,

SteveC [hidden email] http://www.fractalus.com/steve/

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

stevec-4
In reply to this post by Petter Reinholdtsen
* @ 15/07/05 12:09:57 PM [hidden email] wrote:
>
> [Steve Coast]
> > Its been tested on IE 6, Firefox, Safari, Konqueror. If someone with
> > Opera can report success it would be nice.
>
> Very nice.  It works for me on Opera, and I keep Javascript turned
> off. :)

The javascript is just for those using IE to fix its png problems.

Sigh.

have fun,

SteveC [hidden email] http://www.fractalus.com/steve/

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: Re: landsat background to the static renderer

Schuyler Erle
In reply to this post by stevec-4
* On 15-Jul-2005 at  5:34AM PDT, SteveC said:
> * @ 15/07/05 12:44:15 PM [hidden email] wrote:
> > OSM: treading the fine line between reinventing the wheel and the simplest
> > possible thing that works.
>
> a-men to that.
>
> Anyone tried reading the WMS/WFS/WFS-T documentation? If not, walking
> over hot coals might be more fun...

This is why I recommended integrating with GeoServer :-) I just wish I
had time to offer help with that right now :-/ *weeps*

SDE

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Raphael Jacquot-2
In reply to this post by stevec-4
SteveC wrote:

> Hello,
>
> Trying desperately to do a feature-a-day, there is now a landsat
> backdrop to the static image. Courtesy of nasa and a few bits of java
> and javascript. Your browser gets the image straight from nasa, we don't
> do local processing.
>
> Its been tested on IE 6, Firefox, Safari, Konqueror. If someone with
> Opera can report success it would be nice.
>
> Enjoy!
>
> have fun,
>
> SteveC [hidden email] http://www.fractalus.com/steve/

testing north europa fails to show most of the features that are in the
DB...
http://www.openstreetmap.org/edit/viewMap.jsp?lat=60.0&lon=16.75&scale=0.0225


_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Tom Carden
Amaury Jacquot wrote:
>
> testing north europa fails to show most of the features that are in the
> DB...
> http://www.openstreetmap.org/edit/viewMap.jsp?lat=60.0&lon=16.75&scale=0.0225
>
>

There's a limit of 5000 nodes on the static renderer to stop the server
from falling over.  Until we have a way to distinguish "main roads" from
others, or to cache the images, it's likely that looking at a whole
continent will be less than satisfactory.

Of course, there are fun things you can do with millions of gps points
for working out which roads are most important.  They might not agree
with mapping agencies' ideas of important, but just because we can't use
their data, all is not lost :)

There are also plenty of ways to simplify point and line data, so the
5000 node limit is likely to be just a temporary hack.

Best,

Tom.

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Raphael Jacquot-2
In reply to this post by Raphael Jacquot-2
Amaury Jacquot wrote:

> SteveC wrote:
>
>>Hello,
>>
>>Trying desperately to do a feature-a-day, there is now a landsat
>>backdrop to the static image. Courtesy of nasa and a few bits of java
>>and javascript. Your browser gets the image straight from nasa, we don't
>>do local processing.
>>
>>Its been tested on IE 6, Firefox, Safari, Konqueror. If someone with
>>Opera can report success it would be nice.
>>
>>Enjoy!
>>
>>have fun,
>>
>>SteveC [hidden email] http://www.fractalus.com/steve/
>
>
> testing north europa fails to show most of the features that are in the
> DB...
> http://www.openstreetmap.org/edit/viewMap.jsp?lat=60.0&lon=16.75&scale=0.0225

replying to myself (gah)
guess I banged onto the 5000 points limit.
now the scrolling arrows features seem broken, they jump way too far,
and prevent one from understanding where it was (should only jump by 1/2
a screen)


_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap
Reply | Threaded
Open this post in threaded view
|

Re: landsat background to the static renderer

Lars Aronsson
In reply to this post by Tom Carden
Tom Carden wrote:

> There's a limit of 5000 nodes on the static renderer to stop the
> server from falling over.  Until we have a way to distinguish
> "main roads" from others, or to cache the images, it's likely
> that looking at a whole continent will be less than
> satisfactory.

It is good that we have this problem, because it means we have a
lot of data.  Growing pain means we are growing.  A working
solution must be based on our continued growth.

Every street segment has a visible size.  On a map-of-Europe where
scale=0.1 every pixel is 0.1 degrees or 11 km.  All points within
a small city becomes a single pixel.  Instead of looking at the
maybe 400 points that make up the street net of that city, we
could look at generating one pixel: should it be white or not?  
Each entire map is 700x500 = 350,000 pixels.  This is constant and
doesn't change with the map scale or amount of data we collect.
All we need is a fast way to query the database: Is there anything
within this 11x11 km area?  If this can be answered in 1
microsecond, then 350,000 such queries can be answered in 0.35
seconds, which would be a reasonable response time for a
webserver.  I guess this is a standard GIS problem.  Quad trees?


--
  Lars Aronsson ([hidden email])
  Aronsson Datateknik - http://aronsson.se

_______________________________________________
Openstreetmap mailing list
[hidden email]
http://bat.vr.ucl.ac.uk/cgi-bin/mailman/listinfo/openstreetmap