<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ù)  更多評論
      
    主站蜘蛛池模板: 成视频年人黄网站免费视频| 免费看国产精品麻豆| 亚洲AV成人一区二区三区在线看| 日本一道本高清免费| 羞羞视频免费网站含羞草| 国产亚洲3p无码一区二区| 亚洲精品在线免费观看| 免费精品国自产拍在线播放| 亚洲国产精品热久久| 国产男女猛烈无遮挡免费视频网站| 中文字幕无码一区二区免费| 国产午夜亚洲精品| 亚洲成a人片在线观看日本| 一级毛片免费不卡| 亚洲精品在线不卡| 亚洲精品99久久久久中文字幕 | 又大又硬又爽又粗又快的视频免费| 亚洲精品无码久久久久久| 亚洲成av人影院| 国产一区二区三区免费看| 永久黄色免费网站| xxxxxx日本处大片免费看 | 一级成人毛片免费观看| 亚洲人成黄网在线观看| 亚洲色成人中文字幕网站| 两个人看的www高清免费观看| 7777久久亚洲中文字幕| 亚洲AV无码久久精品蜜桃| 亚洲JIZZJIZZ中国少妇中文| 成人黄色免费网站| 久久这里只精品国产免费10| 春意影院午夜爽爽爽免费| 亚洲午夜精品一级在线播放放| 成人免费无码视频在线网站| 久久午夜夜伦鲁鲁片免费无码| 日韩毛片一区视频免费| 亚洲午夜理论片在线观看| 亚洲日本在线观看网址| 亚洲第一极品精品无码久久 | 亚洲人成影院午夜网站| 亚洲爆乳无码专区|