GeoServer 2.5将GetFeatureInfo featureMember几何返回为纬度而不是投影

时间:2014-03-27 23:32:03

标签: geoserver wms

我们正在使用GeoServer 2.1来显示存储在Oracle sdo_geometry中的数据。数据存储在Irish Transverse Mercator(EPSG:2157)中,我们希望将其显示在该投影的地图上。
在2.1.0版本中,当用户点击地图时,我们会发出以下GetFeatureInfo请求:

http://<server>:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=TownlandLayer&QUERY_LAYERS=TownlandLayer&STYLES=,,,&BBOX=618565.0,707446.2,620258.3,708216.1&FEATURE_COUNT=10&HEIGHT=582&WIDTH=1280&FORMAT=image%2Fpng&INFO_FORMAT=application/vnd.ogc.gml&SRS=EPSG:2157&X=587&Y=354

这将返回单击的特征的id,加上几何体为GML(在EPSG:2157坐标中),因此我们可以在地图上突出显示该特征。

这一切都很完美。

本周我们升级到GeoServer 2.5,现在相同的查询返回lat长度而不是EPSG中的几何:2157。据我所知,两个GeoServer实例上的图层配置完全相同,并且它们都在相同的数据库中。

我们对此有点失落。任何想法为什么我们现在将几何图形改为拉/长而不是EPSG:2157?

提前致谢, 约翰

以下是GeoServer 2.1(好)的示例回复:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:PRAI="http://test.org" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://test.org http://172.16.25.35:8080/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=PRAI%3ATownlandLayer http://www.opengis.net/wfs http://172.16.25.35:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
    <gml:boundedBy>
        <gml:null>unknown</gml:null>
    </gml:boundedBy>
    <gml:featureMember>
        <TESTWS:TownlandLayer fid="TownlandLayer.fid-3171d85a_14502e9da6f_48b9">
            <TESTWS:ID>301696</TESTWS:ID>
            <TESTWS:GEOMETRY>
                <gml:Polygon srsName="http://www.opengis.net/gml/srs/epsg.xml#2157">
                    <gml:outerBoundaryIs>
                        <gml:LinearRing>
                            <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">619334.56663122,707639.08780444 619336.865,707641.322 619340.052,707647.078 619354.642,707660.683 619381.414,707688.036 619392.126,707699.266 619400.658,707709.432 619403.251,707716.158 619416.594,707738.985 619445.052,707791.344 619460.49,707818.32 619481.58,707791.968 619490.752,707780.312 619512.212,707754.921 619521.525,707758.33 619523.334,707758.434 619527.772,707756.102 619533.291,707753.399 619536.422,707753.129 619546.07,707753.642 619562.612,707756.743 619577.952,707760.216 619591.012,707764.795 619598.119,707764.368 619618.689,707725.913 619628.925,707707.069 619642.69,707683.799 619659.583,707707.813 619678.88,707730.142 619690.941,707744.223 619697.976,707750.862 619702.657,707755.319 619705.456,707758.187 619709.72,707763.089 619715.228,707772.077 619729.536,707794.243 619715.458,707822.699 619704.511,707851.006 619696.62,707870.846 619686.496,707896.855 619679.904,707913.911 619675.315,707925.887 619672.516,707934.388 619641.547,707929.999 619585.257,707919.482 619518.407,707903.814 619515.202,707906.979 619496.617,707957.979 619481.258,708003.14 619474.046,708032.44 619474.921,708041.108 619471.385,708061.448 619467.113,708081.788 619417.611,708070.788 619374.539,708060.065 619350.628,708055.386 619327.664,708049.547 619304.444,708045.087 619283.454,708040.441 619276.024,708058.095 619273.661,708058.722 619269.497,708059.5395 619264.539,708032.441 619262.7349,708022.932 619249.249,707951.851 619244.598,707924.334 619232.881,707865.048 619229.994,707848.444 619228.9681,707842.7894 619222.356,707806.345 619221.5878,707802.284 619214.3036,707763.7754 619214.236,707763.418 619204.051,707702.811 619192.533,707645.805 619191.526,707641.056 619198.626,707636.88 619225.122,707611.926 619235.35728196,707601.60979202 619303.61998552,707668.89537381 619334.56663122,707639.08780444</gml:coordinates>
                        </gml:LinearRing>
                    </gml:outerBoundaryIs>
                </gml:Polygon>
            </TESTWS:GEOMETRY>
        </TESTWS:TownlandLayer>
    </gml:featureMember>
</wfs:FeatureCollection>

以下是GeoServer 2.5(不良)的示例回复:

<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:PRAI="http://test.org" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://test.org http://geoserver2:8080xx/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=PRAI%3ATownlandLayer http://www.opengis.net/wfs http://geoserver2:8080xx/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd">
    <gml:boundedBy>
        <gml:null>unknown</gml:null>
    </gml:boundedBy>
    <gml:featureMember>
        <TESTWS:TownlandLayer fid="TownlandLayer.fid--1b39d662_14502ea1e37_-6026">
            <TESTWS:ID>301696</TESTWS:ID>
            <TESTWS:GEOMETRY>
                <gml:Polygon srsName="http://www.opengis.net/gml/srs/epsg.xml#2157">
                    <gml:outerBoundaryIs>
                        <gml:LinearRing>
                            <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">-2.66585979,99.44142269 -0.63895079,97.47110743 2.1716334,92.39494721 15.038412,80.39683049 38.64837751,56.27448675 48.09518576,46.37085935 55.61947329,37.40556317 57.90621468,31.47396941 69.67327615,11.34306089 94.7701086,-34.8318302 108.38473012,-58.62170132 126.98379528,-35.3821297 135.07249256,-25.10281706 153.99785711,-2.71074197 162.21090092,-5.7171058 163.80624036,-5.80882239 167.72006925,-3.75225435 172.58722148,-1.36850503 175.34841982,-1.13039466 183.85689686,-1.58280436 198.44512521,-4.31754599 211.97332149,-7.3803508 223.49080802,-11.41852621 229.75840196,-11.04195907 247.8988842,22.87113012 256.92591269,39.4894698 269.06513184,60.01105569 283.96290367,38.83334346 300.98073963,19.14161629 311.61721781,6.72371982 317.82131565,0.86885051 321.94944386,-3.06173429 324.41785465,-5.5909955 328.17823463,-9.91402146 333.03568607,-17.84045094 345.65377162,-37.38843 333.23852083,-62.48349868 323.58446837,-87.44716571 316.62547249,-104.94386808 307.6972157,-127.88095134 301.88379523,-142.92247127 297.83680092,-153.48398879 295.36839014,-160.98093772 268.0571313,-157.11032146 218.41552969,-147.8354818 159.46116715,-134.01802552 156.63470893,-136.80920813 140.24477882,-181.78561038 126.69982663,-221.61265552 120.33963422,-247.45203956 121.11128818,-255.09626416 117.99292429,-273.03391165 114.22548918,-290.97155914 70.57015852,-281.2707665 32.58538211,-271.81425745 11.49850458,-267.68789301 -8.75322289,-262.5385359 -29.23071426,-258.60530543 -47.7415904,-254.50804337 -54.29403488,-270.07693368 -56.37794152,-270.62987886 -60.05013248,-271.35082413 -64.42254429,-247.45292145 -66.01356247,-239.06702716 -77.90664606,-176.38138699 -82.00831756,-152.11441325 -92.34142551,-99.83066846 -94.88744263,-85.18776291 -95.79217383,-80.20102636 -101.62332028,-48.06106569 -102.30078836,-44.47970942 -108.72465325,-10.51935092 -117.76632112,43.24455845 -127.92393291,93.51759348 -128.81199638,97.70569023 -122.55057568,101.38846388 -99.18401188,123.39515293 -90.15761661,132.49291607 -29.95740459,73.15441817 -2.66585979,99.44142269</gml:coordinates>
                        </gml:LinearRing>
                    </gml:outerBoundaryIs>
                </gml:Polygon>
            </TESTWS:GEOMETRY>
        </TESTWS:TownlandLayer>
    </gml:featureMember>
</wfs:FeatureCollection>

2 个答案:

答案 0 :(得分:2)

答案 1 :(得分:1)

正如Simone所说,这个问题在Ing提供的GeoServer邮件列表中得到了回答。安德里亚艾梅。

我在JVM启动参数中设置了以下内容: -Dorg.geoserver.wms.featureinfo.render.enabled = FALSE 并且GeoFeatureInfo像以前一样恢复工作。