Hello,

I am using GeoWebCache(GWC) as part of a GeoServer installation. I have a
layer that consists of parcels (polygon)...  I cannot get GWC layer/tiles
(EPSG:4326) to align correctly with the parcels from the Geoserver WMS
service  or Bing Maps etc. -- It seems that the parcels served from GWC
shift to the north and west by several feet.  I am able to get WMS service
from GeoServer to align correctly with other serices that are projected in
EPSG:4326 (e.g. Bing )  but not GWC. No matter what I do, it seems that
layers/tile served from GWC shifts .. My parcels are projected as EPSG:3424
on the GeoServer.


Here are some code snippets...

var map, formats, event_xy;
 var wfsurl = "http://noah:8080/geoserver/wfs";;
 var url = "http://noah:8080/geoserver/wms";;
 var cacheurl = "http://noah:8080/geoserver/gwc/service/wms";; // cached url
 vvar bounds = new OpenLayers.Bounds(
    -74.553, 40.037,
    -74.438, 40.129
  );

  var options = {
   //controls: [],
   maxExtent: bounds,
   maxResolution: 0.00044921875,
                        resolutions: [0.703125, 0.3515625, 0.17578125,
0.087890625, 0.0439453125, 0.02197265625, 0.010986328125, 0.0054931640625,
0.00274658203125, 0.001373291015625, 6.866455078125E-4, 3.4332275390625E-4,
1.71661376953125E-4, 8.58306884765625E-5, 4.291534423828125E-5,
2.1457672119140625E-5, 1.0728836059570312E-5, 5.364418029785156E-6,
2.682209014892578E-6, 1.341104507446289E-6, 6.705522537231445E-7,
3.3527612686157227E-7],
   projection: "EPSG:4326",
   units: "degrees"
  };

  map = new OpenLayers.Map(options);


  var road = new OpenLayers.Layer.Bing({
   key: apiKey,
   type: "Road"
   //metadataParams: {mapVersion: "v1"}
  });
  var aerial = new OpenLayers.Layer.Bing({
   key: apiKey,
   type: "Aerial"
  });
  var hybrid = new OpenLayers.Layer.Bing({
   key: apiKey,
   type: "AerialWithLabels",
   name: "Bing Aerial With Labels"
  });


  var parcel = new OpenLayers.Layer.WMS(
    "Parcels", cacheurl,
    {
     LAYERS: 'xxx:parcel',
     STYLES: '',
     format: format,
     tiled: true,
     transparent: true,
     tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom
    },
    {
     buffer: 0,
     displayOutsideMaxExtent: true,
     isBaseLayer: false,
     visibility: false
    }
  );

                var rparcel = new OpenLayers.Layer.WMS(
    "Raw:Parcels", url,
    {
     LAYERS: 'xxx:parcel',
     STYLES: '',
     format: format,
     tiled: true,
     transparent: true,
     tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom
    },
    {
     buffer: 0,
     displayOutsideMaxExtent: true,
     isBaseLayer: false,
     visibility: false
    }
  );
    map.addLayers([road, aerial, hybrid, rparcel, parcel]);

Any Ideas?  Also, how can I find where GeoServer and GeoWebCache keeps the
definitions for EPSG:4326 --I would like to check the datum...
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to