[OpenLayers-Dev] [OSM-dev] openstreetmap,
openlayers and overlays
Richard Duivenvoorde
rdmailings at duif.net
Thu Jul 5 15:14:30 EDT 2007
Hi List,
I'm trying to show data from two sources:
- a TMS layer showing data from the openstreetmap project
- a postgis layer with points in the netherlands from geonames.org
showing those points on an combined google layer and postgis layer looks
fine:
http://www.duif.net/GoogleGeonames.jpg
But after combining TMS and postgis, it looks like there is some
projection error: see:
http://www.duif.net/OpenStreetsGeonames.jpg
I cannot show the live example because of different postgis database
versions... But the javascriptcode is in:
http://www.duif.net/smap.php
Those points are epsg:4326. Transformed in postgis to 41001 (mercator)
for more details see:
http://lists.openstreetmap.org/pipermail/dev/2007-July/005582.html
and info from the openstreetmap list below.
I thought of some projection error, but Artem proposed to make a
kml-file and show it in a googlemap-app with combined
google/openstreetmap tiles (as he says: google and openstreetmap share
the same tile schema.
Doing that looks fine (thought I cannot show more then about 100 points
in google ???): both google and streetmap align ok here, and the
(latlon/5326 points are on the right places):
http://www.duif.net/googlemapnik.php
So my questions:
- has somebody been successfull in combining Openstreetmap-tiles and
(projected) other features?
- or a TMS layer with some other layers?
- any other clue for shifting besides projection errors?
TIA,
Richard Duivenvoorde
Richard Duivenvoorde wrote:
> Hi Artem,
> ok, tried that:
> http://www.duif.net/googlemapnik.php
>
> looks better (although google seems to have a problem with the kml-file
> I generated by hand: not all 470 points are shown? I looks fine in
> GoogleEarth though).
>
> Will try to make another kml file, and add smaller icons and maybe
> contact OL.
>
> Richard
>
>
> Artem Pavlenko wrote:
>> Hi Richard,
>>
>> On 5 Jul 2007, at 09:55, Richard Duivenvoorde wrote:
>>
>>> Hi List,
>>> I've an OpenLayers page, on which I show the OpenStreetmap (using source
>>> of www.openstreetmap.org <http://www.openstreetmap.org>).
>>>
>>> I downloaded form geonames.org some points and stuffed them in Postgis
>>> (latlon: 4326). I then used Postgis transform to reproject those points
>>> to 51001 / 41001 (aka using proj string:
>>> <41001> +proj=merc +lat_ts=0 +lon_0=0 +k=1.000000 +x_0=0 +y_0=0
>>> +ellps=WGS84 +datum=WGS84 +units=m +no_defs no_defs <>
>>> )
>>>
>>> Showing those points as overlay on a googlemap seems fine:
>>> http://www.duif.net/GoogleGeonames.jpg
>>> But putting them on OSM they seem shifted (or map is shifted?):
>>> http://www.duif.net/OpenStreetsGeonames.jpg
>>> (the big dot in the middle are supposed to be in the city of Amsterdam)
>>>
>> Hmm... both OpenStreetMap and Google are using the same tile schema. You
>> can see this on : http://media.mapnik.org/oxford-osm.html (just pan/zoom
>> to Amsterdam) and they overlap correctly.
>>
>> I suspect OL is doing something different for TMS and Google layers. You
>> can try exporting KML from postgis and overlay it on top of OSM, using
>> GMap interface. If that works you should post to OL list.
>>
>> Cheers
>> Artem
>>
>>
>>> My question:
>>> - do I do something stupid here?
>>>
>>> - does anybody else succeeded in putting custom (latlon) points as
>>> overlay on openstreetmap?
>>>
>>> - has somebody some viable explanation for the shift? (at this moment I
>>> cannot put this stuff on the live server, but if neccessary I will do
>>> that).
>>>
>>> TIA
>>>
>>> Richard
>>>
>>> ps if you think this questions belong on the userlist: let me know, I
>>> just thought here was more interest and knowledge about these kind of
>>> stuff
>>>
>>> _______________________________________________
>>> dev mailing list
>>> dev at openstreetmap.org <mailto:dev at openstreetmap.org>
>>> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>>>
>> Artem Pavlenko
>> http://mapnik.org
>>
>>
>>
>
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>
>
More information about the Dev
mailing list