new static renderer, and other bits

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

new static renderer, and other bits

stevec-4
I've hacked together a new static renderer in ruby to replace the old
one, which was written in Java.

The 'scale' attribute is now the number of degrees per pixel, and should
be accurate. Scale in the old one was 'roughly the number of pixels per
meter on a Sun monitor from 1994'. I kid you not:

http://openmap.bbn.com/cgi-bin/faqw.py?req=all#7.5

There is also a bar at the bottom right to show you how long a kilometer
or 10 or 0.1 is and so on. There are many cosmetic things to be done,
like drawing black lines with thinner white ones on top instead of just
black lines. And changing the thickness of line with scale...

The 'edit this map' link now goes to a default scale on the applet. When
the high-vitamin goodness of Tom's applet comes online the static
renderer and applet will again show the same thing.

I've changed the image size slightly, what do people think?

As part of this, I've started a DAO to talk to the database from which
a new api handler will be written in ruby. We should also be able to do
RESTful things.

Also today, last weeks ecourier data was imported. Another 300,000 odd
points.

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: new static renderer, and other bits

Raphael Jacquot-2
SteveC wrote:
> I've hacked together a new static renderer in ruby to replace the old
> one, which was written in Java.

seems like this new renderer is b0rken...

_______________________________________________
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: new static renderer, and other bits

stevec-4
Works for me?

Flush your browser cache? Send a screenshot?

* @ 13/07/05 05:56:26 PM [hidden email] wrote:
> SteveC wrote:
> > I've hacked together a new static renderer in ruby to replace the old
> > one, which was written in Java.
>
> seems like this new renderer is b0rken...
>

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: new static renderer, and other bits

Graham Wall
Fine here too. Looks good, like the scale indicator.

On 13/07/05, SteveC <[hidden email]> wrote:

> Works for me?
>
> Flush your browser cache? Send a screenshot?
>
> * @ 13/07/05 05:56:26 PM [hidden email] wrote:
> > SteveC wrote:
> > > I've hacked together a new static renderer in ruby to replace the old
> > > one, which was written in Java.
> >
> > seems like this new renderer is b0rken...
> >
>
> 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
>

_______________________________________________
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: new static renderer, and other bits

Raphael Jacquot-2
In reply to this post by stevec-4
SteveC wrote:
> Works for me?
>
> Flush your browser cache? Send a screenshot?

ah, no, it works only from the query page.
existing links are b0rken (see LA2's page)

_______________________________________________
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: new static renderer, and other bits

Petter Reinholdtsen
In reply to this post by Graham Wall

I do not get any images when I visit
<URL:http://www.openstreetmap.org/edit/viewMap.jsp?lat=59.95&lon=10.78&scale=2.3065916E7>

All the map links on
<URL:http://developer.skolelinux.no/~pere/gis/openstreetmap/> seem to
be broken.


_______________________________________________
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: new static renderer, and other bits

Raphael Jacquot-2
Petter Reinholdtsen wrote:
> I do not get any images when I visit
> <URL:http://www.openstreetmap.org/edit/viewMap.jsp?lat=59.95&lon=10.78&scale=2.3065916E7>
>
> All the map links on
> <URL:http://developer.skolelinux.no/~pere/gis/openstreetmap/> seem to
> be broken.

hah, so, I'm not alone :D

_______________________________________________
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: new static renderer, and other bits

stevec-4
* @ 13/07/05 06:42:30 PM [hidden email] wrote:
> Petter Reinholdtsen wrote:
> > I do not get any images when I visit
> > <URL:http://www.openstreetmap.org/edit/viewMap.jsp?lat=59.95&lon=10.78&scale=2.3065916E7>
> >
> > All the map links on
> > <URL:http://developer.skolelinux.no/~pere/gis/openstreetmap/> seem to
> > be broken.
>
> hah, so, I'm not alone :D

I'm very sorry, its something I failed to mention in my original email.
A few of us have looked at the OpenMap notion of 'scale'. As I showed in
my original email, its this random quantity based on pixels per meter
from a Sun Microsystems monitor from 10 years ago. If someone figures
out a relation between that and something sensible we can convert the
links.

Sorry again.

Another thing I forgot is that I've drunk the mod_rewrite kool aid and
am putting things in URLs that (hopefully) will not change from now one,
whatever happens. For example the new static renderer is located at
/map/map.png.

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: new static renderer, and other bits

Schuyler Erle
* On 13-Jul-2005 at  2:28PM PDT, SteveC said:
>
> I'm very sorry, its something I failed to mention in my original email.
> A few of us have looked at the OpenMap notion of 'scale'. As I showed in
> my original email, its this random quantity based on pixels per meter
> from a Sun Microsystems monitor from 10 years ago. If someone figures
> out a relation between that and something sensible we can convert the
> links.

Actually, this runs all through digital cartography, it's not just a
ten year old Sun monitor thing. Basically I think the assumption is 72
dpi all through -- so divide the width in pixels of your map by 72
pixels per inch and you got inches wide. Convert that to meters and
then divide by the horizontal coverage in meters of the map. Invert
and you have scale, I think. We can double check this against the
MapServer source, where I first ran into this.

> Another thing I forgot is that I've drunk the mod_rewrite kool aid and
> am putting things in URLs that (hopefully) will not change from now one,
> whatever happens. For example the new static renderer is located at
> /map/map.png.

w00t!

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: new static renderer, and other bits

Lars Aronsson
In reply to this post by stevec-4
SteveC wrote:

> The 'scale' attribute is now the number of degrees per pixel,

This is incompatible with Multimap.com and other map websites,
which I think is sad.

> The 'edit this map' link now goes to a default scale on the applet.

Having the edit link change the scale is very confusing.  I can
understand that you don't want people to bring up the applet with
a scale too large, but this can be managed by showing the "edit"
link only for finer scales.  For larger scales, the same place can
display some text like "to edit this map, you need to zoom in".


--
  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
Reply | Threaded
Open this post in threaded view
|

Re: new static renderer, and other bits

Lars Aronsson
In reply to this post by Raphael Jacquot-2
Amaury Jacquot wrote:
> existing links are b0rken (see LA2's page)

new scale = old scale / 5.0e8

Especially, old scale = 100000 (used for most cities)
becomes new scale = 0.0002

I have now updated the susning.nu website, e.g.
http://susning.nu/Stockholm , http://susning.nu/Oslo ,
http://susning.nu/Norrk%f6ping , and
http://susning.nu/Paris

Don't the north-south arrows make too long (non-overlaping) jumps?
Is this related to the change in image size?


--
  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
Reply | Threaded
Open this post in threaded view
|

Re: new static renderer, and other bits

stevec-4
In reply to this post by Lars Aronsson
* @ 16/07/05 01:12:30 AM [hidden email] wrote:
> SteveC wrote:
>
> > The 'scale' attribute is now the number of degrees per pixel,
>
> This is incompatible with Multimap.com and other map websites,
> which I think is sad.

++sad

The code is all there, edit viewmap.rb and viewMap.jsp to take
'multimapscale=foo' or 'openmapscale=blah' and convert it to the right
scale... Or give me clear instructions on transforming the scale from
one to another and I'll do it.

> > The 'edit this map' link now goes to a default scale on the applet.
>
> Having the edit link change the scale is very confusing.  I can
> understand that you don't want people to bring up the applet with
> a scale too large, but this can be managed by showing the "edit"
> link only for finer scales.  For larger scales, the same place can
> display some text like "to edit this map, you need to zoom in".

I agree with all this, however I am loathe to start 'fixing' the applet
when we are throwing it away sometime soon, for something so
unbelievably sexy and cool the gods themselves will want to start
mapping the next world.

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: new static renderer, and other bits

stevec-4
In reply to this post by Lars Aronsson
* @ 16/07/05 01:36:09 AM [hidden email] wrote:
> Amaury Jacquot wrote:
> > existing links are b0rken (see LA2's page)
>
> new scale = old scale / 5.0e8
>
> Especially, old scale = 100000 (used for most cities)
> becomes new scale = 0.0002

How did you prove this? You're sure its linear? If so I'll put
'openmapscal=foo' if its needed.

> I have now updated the susning.nu website, e.g.
> http://susning.nu/Stockholm , http://susning.nu/Oslo ,
> http://susning.nu/Norrk%f6ping , and
> http://susning.nu/Paris
>
> Don't the north-south arrows make too long (non-overlaping) jumps?
> Is this related to the change in image size?

I'm not sure what you mean?

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: new static renderer, and other bits

Petter Reinholdtsen
In reply to this post by stevec-4

[Steve Coast]
> I agree with all this, however I am loathe to start 'fixing' the
> applet when we are throwing it away sometime soon, for something so
> unbelievably sexy and cool the gods themselves will want to start
> mapping the next world.

I must have missed this information.  What is it replaced with?

Will it continue to work for me?  :)


_______________________________________________
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: new static renderer, and other bits

stevec-4
* @ 16/07/05 11:09:58 AM [hidden email] wrote:
>
> [Steve Coast]
> > I agree with all this, however I am loathe to start 'fixing' the
> > applet when we are throwing it away sometime soon, for something so
> > unbelievably sexy and cool the gods themselves will want to start
> > mapping the next world.
>
> I must have missed this information.  What is it replaced with?

See Tom's mails about his applet.

> Will it continue to work for me?  :)

I certainly hope so!

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: new static renderer, and other bits

Tom Carden
In reply to this post by stevec-4
SteveC wrote:
> I agree with all this, however I am loathe to start 'fixing' the applet
> when we are throwing it away sometime soon,

Perhaps a note on the applet page itself, noting the things which don't
work and explaining the (temporary) differences between the applet and
the static renderer?

e.g.
delete node doesn't work
areas don't work.
scale is different to the static renderer

I could do that myself, but I'm not sure the list is comprehensive.

> for something so
> unbelievably sexy and cool the gods themselves will want to start
> mapping the next world.

The pressure!

T.

_______________________________________________
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: new static renderer, and other bits

Lars Aronsson
In reply to this post by stevec-4
SteveC wrote:

> > new scale = old scale / 5.0e8

> How did you prove this? You're sure its linear? If so I'll put
> 'openmapscal=foo' if its needed.

I didn't prove it, I just tried some values and this worked for
me.  Map coordinates in susning.nu (for those who can edit this
now closed wiki) use the syntax map:58.4:15.6:100000 for links to
a map centered at 58.4 N, 15.6 E, size 10 cm and scale 1:100000
(assuming some normal screen resolution).  The scale indicates the
size of the geographic object (diameter in decimeters): small or
large city, province or country. As it happens, this syntax was
also used in URLs for the old mapblast.com before that mapping
site was acquired by Microsoft and closed down.  So in several
hundred of susning.nu's pages, there are map coordinates like
this, and on display they are transformed to a number of links to
mapping sites that are still open.  You can see this on a page
like http://susning.nu/Link%f6ping near the green GeoURL logo.
The links used to include
http://www.openstreetmap.org/edit/viewMap.jsp?lat=58.4&lon=15.6&scale=100000 
but after July 13th, I had to add this line of code to my Perl
script:

    $scale = sprintf("%f", $scale / 5.0e8);

and that seems to take care of everything.

> > Don't the north-south arrows make too long (non-overlaping) jumps?
> > Is this related to the change in image size?
>
> I'm not sure what you mean?

When I go to
http://www.openstreetmap.org/edit/viewMap.jsp?lat=58.4&lon=15.6&scale=0.000200
and click the up arrow to pan north, it goes directly to
http://www.openstreetmap.org/edit/viewMap.jsp?lat=58.46&lon=15.6&scale=2.0E-4

I think the jump from 58.4 to 58.46 (the north-south increment) is
too long.  There is no overlap, but instead a part is missing.  
Jumping to 58.45 makes a zero-overlap jump.  Best would be 58.44.

The east-west increment is just fine.  And the north-south
increment in the editing applet is also just fine.


--
  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