<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    zhyiwww
    用平實的筆,記錄編程路上的點點滴滴………
    posts - 536,comments - 394,trackbacks - 0

    STEP 1. Create A DataStore

    STEP 1.1
    Start Geoserver and then open your running Geoserver start page. If it is run locally,
    the address is http://localhost:8080/geoserver<- Try clicking it if you have Geoserver already running
    To get to it, open up your favorite web browser and type in that address. It will take you to the Geoserver start page.

    Now we need to navigate to the DataStore config section of Geoserver.

    Click on the 'Config' button. If you are not already logged in, log yourself in with the default username and password (username: admin , password: geoserver).

    Next, click on the 'Data' button.

    Then, click on the 'Stores' button.

    STEP 1.2
    You need to tell Geoserver where the data is.

    Select 'New' on the left purple-ish panel

    STEP 1.3
    Select 'DataStore Description' as 'Shapefile'
    Also set DataStore ID to be your shapefile name, it can be whatever you want, not necessarily the file name.
    For our example, enter mytutorial

    When you are done, hit the 'New' button.

    STEP 1.4
    Now we need to specify the shapefile we want to use. To locate the shapefile we need to specify where it lives relative to the data directory (data_dir/). The data directory lives right under the root location of GeoServer. For example:
    C:\Java\Geoserver\data_dir
    In the data directory, there is a sub directory called data/ (C:\Java\Geoserver\data_dir\data). Place your shapefile in that directory.

    In the URL field, enter the location of the file. For example:

    file:data/tutorial.shp


    All URLs you will use are relative to the data directory (data_dir/). If you do not want to copy your full shapefile into GeoServer, there are other ways to refer to it, see the full Shapefile DataStore section of the docs.

    Hit the 'Submit' button.

    Now, we need to register all the changes. To do that, hit the 'Apply' button on the left, then 'Save' if you want to save it out for future use.

    STEP 2. Create The FeatureType

    STEP 2.1
    Now, back up a spot in Geoserver Config and go to Config -> Data -> FeatureType

    Hit 'New'

    From the drop down list, Feature Type Name, select your datastore.

    Then Hit 'New'

    STEP 2.2
    Select your DataStore: test_datastore:::tutorial

    Then hit the 'New' button.

    STEP 2.3

    A new screen will appear that looks a little confusing, but you can
    ignore most of it. One thing you have to enter is the SRS value. If you
    don't know what SRS is and you just want to see your stuff, then enter 4326.

    Definitions

    SRS (Spatial Reference System):
    The SRS value describes what projection the data is in. It is represented by a number that uniquely identifies each projection.

    Hit the 'Generate' button, this will get your bounding box and display your projection information in a faded grey color.

    STEP 2.4
    Now you have to add a style for the data. The style defines how the data will be drawn (color, line thickness etc..).
    You can use one of the pre-cooked styles in the "Style" drop down list or create your own using the "Create New SLD" button.
    If you select to use an existing style, make sure it can render your type of geometry. If you have points, use a style that can render points (for example the "point" SLD). For lines use a line style, for polygons use a polygon style. There are three default styles for you to use: point, line, polygon.

    If you opt to create a new SLD with the SLD Wizard, it is pretty easy. It knows what geometries your data uses and will display the appropriate fields you need to style your data.
    All you have to do in fill in the appropriate colors, either by hand or by clicking on the little multi-colored box next to the color field. This is the color picker. When you are done configuring your style, hit the Apply Style button. Then hit the Finished button.
    (There is a known bug that will cause the style not to be applied if the feature type you just created hasn't been saved, this will be fixed in the next release).

    STEP 2.5

    Hit the 'submit' button. The window will change again and take you back to the FeatureType screen.

    STEP 2.6

    • Once again, hit the 'Apply' and then 'Save' buttons.


    STEP 3. Try It Out

    STEP 3.1
    You can try out the WFS with this URL (change the typename from tutorial to your featureType name):
    http://localhost:8080/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=tutorial

    You should get back a bunch of XML (GML), and it should look confusing, but you can probably make out the attributes of your file.

    STEP 3.2
    You can also view the data in Google Earth (sweet!). If you have Google Earth installed, all you have to do is open up a web browser and enter this URL (changing myFeatureType to match your FeatureType name):
    http://localhost:8080/geoserver/wms/kml_reflect?layers=myFeatureType

    STEP 3.3

    You can try out the WMS, instantly viewing your new layer with the MabBuilder based preview:
    http://localhost:8080/geoserver/mapPreview.do
    Just find the layer you added, and you'll get a nice zoomable map of the extent. For a more advanced view you'll actually have to dig into http://mapbuilder.sourceforge.net, or check out the Clients section for other options, both desktop and web-based]



    |----------------------------------------------------------------------------------------|
                               版權(quán)聲明  版權(quán)所有 @zhyiwww
                引用請注明來源 http://m.tkk7.com/zhyiwww   
    |----------------------------------------------------------------------------------------|
    posted on 2007-02-06 16:36 zhyiwww 閱讀(4851) 評論(1)  編輯  收藏 所屬分類: gis

    FeedBack:
    # re: GeoServer中配置shp文件作為數(shù)據(jù)源(轉(zhuǎn)載)
    2007-05-21 19:22 | 鬼才心
    抄了一下,E文呀老兄。
    希望跟你交流一下,msn:changeself@hotmail.com  回復(fù)  更多評論
      
    主站蜘蛛池模板: 亚洲真人日本在线| 亚洲六月丁香六月婷婷蜜芽| 久久青青草原国产精品免费| 亚洲精品无码久久毛片波多野吉衣| 成人免费无码大片a毛片| 免费一级全黄少妇性色生活片| 亚洲综合在线视频| 国产一区二区三区在线免费| 精品成人免费自拍视频| 亚洲AV日韩综合一区| 亚洲国产天堂在线观看| 国产午夜影视大全免费观看| 少妇太爽了在线观看免费视频| 亚洲av成人无码网站…| 亚洲天堂中文资源| 亚洲国产精品综合久久网络| 亚洲一区二区三区免费在线观看| 日本高清免费中文在线看| 亚洲春色在线观看| 青青草原亚洲视频| 免费羞羞视频网站| 91香蕉成人免费网站| a级毛片毛片免费观看久潮| 鲁死你资源站亚洲av| 亚洲精品在线免费看| 国产亚洲精aa成人网站| 国产在线19禁免费观看国产| 最近新韩国日本免费观看| 巨胸喷奶水视频www免费视频| 亚洲乱码在线观看| 色噜噜综合亚洲av中文无码| 国产亚洲精品无码拍拍拍色欲| 处破痛哭A√18成年片免费| 亚洲视频免费在线看| a级毛片免费播放| 一级毛片在播放免费| 久久亚洲精品无码网站| 亚洲国产精品综合久久20| 亚洲神级电影国语版| 久久国产精品亚洲综合| 亚洲日韩欧洲乱码AV夜夜摸 |