[OpenLayers-Users] R: openlayers can't show an image layer in the right place starting from a center point

Matteo Galletti m.galletti at eldes.it
Mon Sep 23 00:42:31 PDT 2013


Thanks for the response,
the problem is this, whereas I am a newbie of this argument. I don't know
what do you mean with "the image needs to be in the same projections" as
your base layers. You mentioned to "create a layer in Geoserver from the
image" or "doing it in the proper image transformation tools". Also I don't
know what do you mean with " 400x400km on the ground or 400x400 projected
kms". I am sorry, probably there are some assumptions that I should know
that I am completely ignoring. What I know is only that I have a png image
400x400 pixels, each pixel is a km so it represents a linear square area of
400x400 kilometers and I have to draw it centered in a specific lat/lon
point.

Do I need to 'convert' my png image using some specific external tools to
'reproject' it in the right way? Yes, I confirm that my projection is 90013
whereas I use OpenStreetMap and/or Google Maps.

Would you be so kind to address me to understand this argument? What are
these 'external tools' to reproject my image? How should I proceed to get,
starting from my linear 400x400 kilometers png image, a resulting image that
I can use in a Image Layer?

Thanks.


Matteo Galletti 

-----Messaggio originale-----
Da: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Per conto di Phil Scadden
Inviato: domenica 22 settembre 2013 22:58
A: openlayers-users at lists.osgeo.org
Oggetto: Re: [OpenLayers-Users] openlayers can't show an image layer in the
right place starting from a center point

Some thoughts. Firstly, the image needs to be in the same projection as your
base layer. Openlayers does not reproject images on the fly. If you instead
created a layer in Geoserver from the image, then it can reproject but you
may prefer the results from doing it in proper image transformation tools.

Assuming that you have got image in the correct projection, then make sure
you do all the calculations in that baselayer projection. Your calculations
involve a number of implicit assumptions about the projection and looking at
your code, it appears the base layer is 900913. This does not have linear
scaling so I doubt it will work like that. When you say the image represents
400x400 kilometers does that really mean 400x400km on the ground or 400x400
projected "kms"?

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.

_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list