[Geoserver-users] geoserver wms overlay on virtual earth trouble

My understanding is that geoserver can reproject from any supported declared SRS to that of Virtual Earth/google/etc (EPSG:900913). Trouble is my WMS data stored in State Plane Coordinates (EPSG: 2231) do not line up with Virtual earth. See code below. Can anyone help me? I’m using openlayers as a client and have cross-posted the same question to that list. I’ve read nearly every document I can find on overlaying WMS on commercial data providers that use spherical Mercator but can’t get it to work.

In a WMS request, what does the ‘SRS’ option do? Does it simply declare the SRS of the requested layer(s) or does it actually ask geoserver to reproject the data?

var map;

function init() {

var bounds = new OpenLayers.Bounds

(-20037508.34, -20037508.34, 20037508.34, 20037508.34);

map = new OpenLayers.Map(‘map’,{projection: new OpenLayers.Projection(“EPSG:900913”), maxExtent: bounds}//,

/displayProjection: new OpenLayers.Projection(“EPSG:4326”)}/);

// pink tile avoidance

OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;

// make OL compute scale according to WMS spec

OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

velayer = new OpenLayers.Layer.VirtualEarth( “VE”,

{ ‘type’: VEMapStyle.Shaded, ‘spericalMercator’: true});

var wms = new OpenLayers.Layer.WMS(

“Joint Use Pictures”,

http://upigis:8080/geoserver/wms”,

{layers: ‘sde:jointusepicture’, transparent: true}, {‘opacity’: 0.5, ‘isBaseLayer’: false, ‘wrapDateLine’: true, ‘displayOutsideMaxExtent’: true}

);

map.addLayers([velayer, wms]);

map.addControl(new OpenLayers.Control.LayerSwitcher());

map.zoomToMaxExtent();

}

David A. Hollema

GIS Analyst

United Power, Inc.

Hi David,

I can see that you have spericalMercator, not sphericalMercator. Don't know if it's the cause, but you'd better fix that.

- mika -

David Hollema kirjoitti:

My understanding is that geoserver can reproject from any supported declared SRS to that of Virtual Earth/google/etc (EPSG:900913). Trouble is my WMS data stored in State Plane Coordinates (EPSG: 2231) do not line up with Virtual earth. See code below. Can anyone help me? I’m using openlayers as a client and have cross-posted the same question to that list. I’ve read nearly every document I can find on overlaying WMS on commercial data providers that use spherical Mercator but can’t get it to work.

In a WMS request, what does the ‘SRS’ option do? Does it simply declare the SRS of the requested layer(s) or does it actually ask geoserver to reproject the data?

var map;

function init() {

var bounds = new OpenLayers.Bounds

(-20037508.34, -20037508.34, 20037508.34, 20037508.34);

map = new OpenLayers.Map('map',{projection: new OpenLayers.Projection("EPSG:900913"), maxExtent: bounds}//,

/*displayProjection: new OpenLayers.Projection("EPSG:4326")}*/);

// pink tile avoidance

OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;

// make OL compute scale according to WMS spec

OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

velayer = new OpenLayers.Layer.VirtualEarth( "VE",

{ 'type': VEMapStyle.Shaded, 'spericalMercator': true});

var wms = new OpenLayers.Layer.WMS(

"Joint Use Pictures",

"http://upigis:8080/geoserver/wms",

{layers: 'sde:jointusepicture', transparent: true}, {'opacity': 0.5, 'isBaseLayer': false, 'wrapDateLine': true, 'displayOutsideMaxExtent': true}

);

map.addLayers([velayer, wms]);

map.addControl(new OpenLayers.Control.LayerSwitcher());

map.zoomToMaxExtent();

}

David A. Hollema

GIS Analyst

United Power, Inc.

------------------------------------------------------------------------

------------------------------------------------------------------------------
  ------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  

One silly typo, everything else was fine. The data now overlay fine.
Thanks Mika! Question, does the SRS option in a standard WMS request
declare the data's native projection or is it specifying which
projection I want geoserver to reproject my data to?

Dave

-----Original Message-----
From: Mika Lehtonen [mailto:mika@anonymised.com]
Sent: Tuesday, March 31, 2009 12:22 PM
To: David Hollema
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] geoserver wms overlay on virtual earth
trouble

Hi David,

I can see that you have spericalMercator, not sphericalMercator. Don't
know if it's the cause, but you'd better fix that.

- mika -

David Hollema kirjoitti:

My understanding is that geoserver can reproject from any supported
declared SRS to that of Virtual Earth/google/etc (EPSG:900913).
Trouble is my WMS data stored in State Plane Coordinates (EPSG: 2231)
do not line up with Virtual earth. See code below. Can anyone help me?

I'm using openlayers as a client and have cross-posted the same
question to that list. I've read nearly every document I can find on
overlaying WMS on commercial data providers that use spherical
Mercator but can't get it to work.

In a WMS request, what does the 'SRS' option do? Does it simply
declare the SRS of the requested layer(s) or does it actually ask
geoserver to reproject the data?

var map;

function init() {

var bounds = new OpenLayers.Bounds

(-20037508.34, -20037508.34, 20037508.34, 20037508.34);

map = new OpenLayers.Map('map',{projection: new
OpenLayers.Projection("EPSG:900913"), maxExtent: bounds}//,

/*displayProjection: new OpenLayers.Projection("EPSG:4326")}*/);

// pink tile avoidance

OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;

// make OL compute scale according to WMS spec

OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

velayer = new OpenLayers.Layer.VirtualEarth( "VE",

{ 'type': VEMapStyle.Shaded, 'spericalMercator': true});

var wms = new OpenLayers.Layer.WMS(

"Joint Use Pictures",

"http://upigis:8080/geoserver/wms",

{layers: 'sde:jointusepicture', transparent: true}, {'opacity': 0.5,
'isBaseLayer': false, 'wrapDateLine': true, 'displayOutsideMaxExtent':

true}

);

map.addLayers([velayer, wms]);

map.addControl(new OpenLayers.Control.LayerSwitcher());

map.zoomToMaxExtent();

}

David A. Hollema

GIS Analyst

United Power, Inc.

------------------------------------------------------------------------

------------------------------------------------------------------------
------

  

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  
------------------------------------------------------------------------
------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Excellent!
The latter, if I understood you right.

- mika -

David Hollema kirjoitti:

One silly typo, everything else was fine. The data now overlay fine.
Thanks Mika! Question, does the SRS option in a standard WMS request
declare the data's native projection or is it specifying which
projection I want geoserver to reproject my data to?

Dave

-----Original Message-----
From: Mika Lehtonen [mailto:mika@anonymised.com] Sent: Tuesday, March 31, 2009 12:22 PM
To: David Hollema
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] geoserver wms overlay on virtual earth
trouble

Hi David,

I can see that you have spericalMercator, not sphericalMercator. Don't know if it's the cause, but you'd better fix that.

- mika -

David Hollema kirjoitti:
  

My understanding is that geoserver can reproject from any supported declared SRS to that of Virtual Earth/google/etc (EPSG:900913). Trouble is my WMS data stored in State Plane Coordinates (EPSG: 2231) do not line up with Virtual earth. See code below. Can anyone help me?
    
I'm using openlayers as a client and have cross-posted the same question to that list. I've read nearly every document I can find on overlaying WMS on commercial data providers that use spherical Mercator but can't get it to work.

In a WMS request, what does the 'SRS' option do? Does it simply declare the SRS of the requested layer(s) or does it actually ask geoserver to reproject the data?

var map;

function init() {

var bounds = new OpenLayers.Bounds

(-20037508.34, -20037508.34, 20037508.34, 20037508.34);

map = new OpenLayers.Map('map',{projection: new OpenLayers.Projection("EPSG:900913"), maxExtent: bounds}//,

/*displayProjection: new OpenLayers.Projection("EPSG:4326")}*/);

// pink tile avoidance

OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;

// make OL compute scale according to WMS spec

OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

velayer = new OpenLayers.Layer.VirtualEarth( "VE",

{ 'type': VEMapStyle.Shaded, 'spericalMercator': true});

var wms = new OpenLayers.Layer.WMS(

"Joint Use Pictures",

"http://upigis:8080/geoserver/wms",

{layers: 'sde:jointusepicture', transparent: true}, {'opacity': 0.5, 'isBaseLayer': false, 'wrapDateLine': true, 'displayOutsideMaxExtent':
    
true}

);

map.addLayers([velayer, wms]);

map.addControl(new OpenLayers.Control.LayerSwitcher());

map.zoomToMaxExtent();

}

David A. Hollema

GIS Analyst

United Power, Inc.

------------------------------------------------------------------------
  

------------------------------------------------------------------------
------
  

------------------------------------------------------------------------
  

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
  
------------------------------------------------------------------------
------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users