Hello list, We have some data that are non-georectified and we would like to visualize them over an OSM map (after georectification) in OpenLayers. Since we may have a quite big quantity of data in our PostGIS database, we would like to import the different layers in Geoserver without preprocessing them (to avoid a duplication of data and minimize the db size) and do it on-the-fly when we display them. To that end, I thought of doing it via styling with Geoserver.
I am displaying the layer over the OSM map via Openlayers like: var wms = new OpenLayers.Layer.WMS("Geotiff6", "http://foo.bar/geoserver/opengeo/wms", { layers: "test", styles: "georectify2", env: "wms_transparent:false;wms_crs:EPSG:900913;wms_gcp:[[[0, 0], [724181.691693196, 5863101.45682414]], [[0, 450], [724330.553821501, 5858374.51975302]], [[600, 0], [735455.441977693, 5863497.42149311]], [[600, 450], [734605.806108252, 5858693.98805558]]]", }, { singleTile: true, isBaseLayer: false, } ); with the style being : <?xml version="1.0" encoding="ISO-8859-1"?> <StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <NamedLayer> <Name>GeorectifyCoverage</Name> <UserStyle> <Title>Georectify Coverage</Title> <Abstract>Warps image to specified GCP</Abstract> <FeatureTypeStyle> <Transformation> <ogc:Function name="gs:GeorectifyCoverage"> <ogc:Function name="parameter"> <ogc:Literal>data</ogc:Literal> </ogc:Function> <ogc:Function name="parameter"> <ogc:Literal>gcp</ogc:Literal> <ogc:Function name="env"><ogc:Literal>wms_gcp</ogc:Literal></ogc:Function> </ogc:Function> <ogc:Function name="parameter"> <ogc:Literal>targetCRS</ogc:Literal> <ogc:Function name="env"><ogc:Literal>wms_crs</ogc:Literal></ogc:Function> </ogc:Function> <ogc:Function name="parameter"> <ogc:Literal>transparent</ogc:Literal> <ogc:Function name="env"><ogc:Literal>wms_transparent</ogc:Literal></ogc:Function> </ogc:Function> </ogc:Function> </Transformation> <Rule> <RasterSymbolizer> <Opacity>1.0</Opacity> </RasterSymbolizer> </Rule> </FeatureTypeStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor> ie I pass the coordinates, the CRS and the transparent parameter through a GET request with the "env" variable. Neither Geoserver nor OpenLayers return me an error or warning, and the layer seems to be correctly orthorectified, but it doesn't appear at the correct coordinates. If you look at the picture below, you can see that it appears north of the position defined (the polygon). I tried everything I could thing of with OL without any luck, and the problem seems to lie with Geoserver. Is this a bug of the WPS process, or is the style incorrect? Also, I don't know if the idea of doing the on-the-fly georectification via styling is the best solution, but the only one we thought could work. Any help with that would also be very appreciated Thanks in advance, Bulkilol PS: I think the first time I tried to sent the mail failed. I apologies if there was a double post. <http://osgeo-org.1560.x6.nabble.com/file/n5074248/georectification2.png> -- View this message in context: http://osgeo-org.1560.x6.nabble.com/georectification-via-SLD-not-display-in-the-correct-position-tp5074248.html Sent from the GeoServer - User mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users