wlerner

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Please help…need help on how to show country names on map… #4147

    wlerner
    Participant

    See this post for some assistance:

    https://www.naturalearthdata.com/forums/topic.php?id=95

    in reply to: physical labels help… #4151

    wlerner
    Participant
    in reply to: Using Natural Earth Cultural and Physical Data in Geoserver #4156

    wlerner
    Participant

    To place black points with location names above the points, you could use the following in your SLD:

    <FeatureTypeStyle>
    <Rule>
    <PointSymbolizer>
    <Graphic>
    <Mark>
    <WellKnownName>circle</WellKnownName>
    <Fill>
    <CssParameter name="fill">#000000</CssParameter>
    </Fill>
    </Mark>
    <Size>4</Size>
    </Graphic>
    </PointSymbolizer>
    <TextSymbolizer>
    <Label>
    <ogc:PropertyName>Name</ogc:PropertyName>
    </Label>
    <Font>
    <CssParameter name="font-family">Arial</CssParameter>
    <CssParameter name="font-size">4</CssParameter>
    <CssParameter name="font-style">normal</CssParameter>
    <CssParameter name="font-weight">bold</CssParameter>
    </Font>
    <LabelPlacement>
    <PointPlacement>
    <AnchorPoint>
    <AnchorPointX>0.5</AnchorPointX>
    <AnchorPointY>0.0</AnchorPointY>
    </AnchorPoint>
    <Displacement>
    <DisplacementX>0</DisplacementX>
    <DisplacementY>5</DisplacementY>
    </Displacement>
    </PointPlacement>
    </LabelPlacement>
    <Fill>
    <CssParameter name="fill">#000000</CssParameter>
    </Fill>
    </TextSymbolizer>
    </Rule>
    </FeatureTypeStyle>

    For this to work with Natural Earth data, note the following line:

    <ogc:PropertyName>Name</ogc:PropertyName>

    The property “Name” must be exactly as shown. This is because the “Name” property is what is actually called from the map layer to display the name.

    Please understand that this is not the complete file! Do not cut and paste this. In order for this to work, one also needs the headers, which you can find in any of the GeoServer sample styles built in to the software.

    I hope this was helpful.

    Warren

    in reply to: Using Natural Earth Cultural and Physical Data in Geoserver #4155

    wlerner
    Participant

    I have discovered that you must edit the styled layer descriptor (SLD) or make a new one in order for the data to be shown correctly. A good resource for this is the SLD Cookbook, written by the GeoServer folks. This book contains some wonderful examples that I used to get the data to display correctly.

    If you use GeoServer and examine the layer, you can see that there is a fair amount of data attached to the 10m_populated_places layer, which allows you to display all sorts of data.

    It would be most helpful if people would post their SLD files regarding the Natural Earth data, both cultural and physical.

    in reply to: Using Natural Earth Cultural and Physical Data in Geoserver #4153

    wlerner
    Participant

    You may want to take a look at this link:

    http://earthatlas.info/naturalearth/

    The website here has the desired effect I think we are both looking for. I have contacted to website author, so any advice he offers I will repost here. Please let me know if you discover anything in the mean time. 8)

    in reply to: Using Natural Earth Raster Data in GeoServer #4067

    wlerner
    Participant

    After much Googling, I discovered the answer for this question on my own. The answer was posted on a blog, located at http://bla.sphemo.us/?p=3 The answer is pasted below in case the blog disappears. This worked fine for me under Red Hat Linux 5.5, with FWTools version 2.0.6.

    ====================

    Natural Earth provides three raster data sets at 1:10m that are relatively easy to integrate into GeoServer.

    This assumes you have GeoServer 2.0.1 and GDAL installed. GDAL is available as a package for most linux distributions, as source via their website, and in the FWTools kit. If you are on Windows, FWTools is your only option. FWTools has not been updated for Linux in some time, I’d recommend compiling from source.

    Once you get GDAL installed, download the large raster version of Natural Earth that you want to serve via GeoServer. Unzip.

    If on Windows, run the commands from the FWTools shell. If not, you can figure it out.

    ]$ gdal_translate -a_srs EPSG:4326 -of GTiff -co “TILED=YES” -co “TFW=YES” PATH_TO_DOWNLOAD.tif OUTPUT_FILE.tiff

    Once that completes:

    ]$ gdaladdo -r averages OUTPUT_FILE.tiff 2 4 8 16 32 64 128

    Note: Some old versions of libtiff will generate errrors when running the above command. If you get errors, update your GDAL to use a newer version of libtiff. FWTools for windows should be safe.

    You should now have a properly referenced .tiff and .tfw file. Now we must add it to GeoServer. Open up your GeoServer admin and add a new “ WorldImage – A raster file accompanied by aspatial data file” store. Add the path to the TIFF in to the “URL *” field.

    Publish the resulting dataset, and wala. Test the layer with the Layer Preview tool. Seed it with GeoWebCache to speed up the access and you have a nice reliable basemap for all your mapping applications.

Viewing 6 posts - 1 through 6 (of 6 total)