東京都のマップファイルと同じように、あきる野市のマップファイルに WFS サーバを設定します。
user@debian7-vmw:~/mapfile$ vim nippon_bmi_akiruno_pgis.map
MAP NAME nippon_bmi_akiruno_pgis_map STATUS ON SIZE 600 300 EXTENT -63063.744614 -34495.938759 -45431.621385 -24289.584360 UNITS meters IMAGECOLOR 255 255 255 FONTSET "fonts.txt" PROJECTION # 投影法 (OpenLayers のため追加) "init=epsg:2451" END
WEB IMAGEPATH "/home/user/mapsite/ms_tmp/" IMAGEURL "/mapsite/ms_tmp/" METADATA "wms_title" "Nippon BMI Akiruno Map WMS Server" "wms_onlineresource" "http://localhost/cgi-bin/mapserv?map=/home/user/mapfile/nippon_bmi_akiruno_pgis.map&" "wms_srs" "EPSG:2451 EPSG:2456 EPSG:4326" "wms_enable_request" "*" "wfs_title" "Nippon BMI Akiruno Map WFS Server" # WFS サーバ設定 "wfs_onlineresource" "http://192.168.10.200/cgi-bin/mapserv?map=/home/user/mapfile/nippon_bmi_akiruno_pgis.map&" "wfs_srs" "EPSG:2451" "wfs_enable_request" "*" END END
--- LAYER NAME akiruno_kukaku GROUP akiruno_kukaku TYPE POLYGON STATUS ON
--- METADATA "wms_title" "Akiruno Kukaku Map WMS Layer" "wms_format" "image/png" "wms_srs" "EPSG:2451 EPSG:4326" "wfs_title" "Akiruno Kukaku Map WFS Layer" "wfs_srs" "EPSG:2451 EPSG:4326" "gml_include_items" "all" "gml_featuredid" "gid" END ---
nippon_bmi_akiruno_pgis.map の GetCapabilities の出力結果
user@debian7-vmw:~/ドキュメント$ wget -O bmi_akiruno_wfs_gc.xml "http://localhost/cgi-bin/mapserv?map=/home/user/mapfile/nippon_bmi_akiruno_pgis.map&service=wfs&version=1.0.0&request=GetCapabilities"
user@debian7-vmw:~/ドキュメント$ vim bmi_akiruno_wfs_gc.xml
<?xml version='1.0' encoding="ISO-8859-1" ?>
<WFS_Capabilities
version="1.0.0"
updateSequence="0"
xmlns="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd">
<!-- MapServer version 6.0.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
<Service>
<Name>MapServer WFS</Name>
<Title>Nippon BMI Akiruno Map WFS Server</Title>
<OnlineResource>http://192.168.10.200/cgi-bin/mapserv?map=/home/user/mapfile/nippon_bmi_akiruno_pgis.map&</OnlineResource>
</Service>
---
<FeatureTypeList>
<Operations>
<Query/>
</Operations>
<FeatureType>
<Name>akiruno_kukaku</Name>
<Title>Akiruno Kukaku Map WFS Layer</Title>
<SRS>EPSG:2451</SRS>
<LatLongBoundingBox minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" maxy="2.5e+07" />
</FeatureType>
---
1 「<WFS_Capabilities...」WFS Capabiities の名前空間
2 「<!-- MapServer version 6.0.1...」MapServer の動作している機能
3 「<Service>...」WFS の設定
4 「<FeatureTypeList>...」各レイヤの設定
nippon_bmi_akiruno_pgis.map の getfeature の出力結果
user@debian7-vmw:~/ドキュメント$ wget -O bmi_akiruno_kukaku_wfs_gf.xml "http://localhost/cgi-bin/mapserv?map=/home/user/mapfile/nippon_bmi_akiruno_pgis.map&service=wfs&version=1.0.0&request=GetFeature&TYPENAME=akiruno_kukaku"
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://192.168.10.200/cgi-bin/mapserv?map=/home/user/mapfile/nippon_bmi_akiruno_pgis.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=akiruno_kukaku&OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:2451">
<gml:coordinates>-63063.744614,-34495.938759 -45431.621385,-24289.584360</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:akiruno_kukaku fid="akiruno_kukaku.1">
<gml:boundedBy>
<gml:Box srsName="EPSG:2451">
<gml:coordinates>-63063.744614,-34495.938759 -45431.621385,-24289.584360</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Polygon srsName="EPSG:2451">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-63063.744614,-25263.387051
---
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</ms:msGeometry>
<ms:gid>1</ms:gid>
<ms:id>K4_1</ms:id>
<ms:uuid>fgoid:10-00200-11-6572-94188</ms:uuid>
<ms:presences>20120305</ms:presences>
<ms:presencef>29991231</ms:presencef>
<ms:finished>20120305</ms:finished>
<ms:orggilvl>2500</ms:orggilvl>
<ms:orgmdid></ms:orgmdid>
<ms:category>表示</ms:category>
<ms:flag>既存</ms:flag>
<ms:type>郡市・東京都の区</ms:type>
<ms:name>あきる野市</ms:name>
<ms:code>13228</ms:code>
</ms:akiruno_kukaku>
</gml:featureMember>
---
1 「<wfs:FeatureCollection...」WFS FeatureCollection の名前空間
2 以下、地物のデータ
0 件のコメント:
コメントを投稿