Skip to content

Commit

Permalink
[GEOS-10624] data directory ne workspace (geoserver#6198)
Browse files Browse the repository at this point in the history
* [GEOS-10624] data directory ne workspace

This key addition is of the ne workspace containing a geopackage and associated layers for a simple world map. The geopackage is produced by a build/data/build.xml ant script that downloads and processes a geopackage using gdal/ogr.

This change updates contact information in support of [GSIP 202] Welcome Page:

* Welcome message introducing service
* For more information: both organization name and online resource to display a link
* Contact admin: requires email address mailto link
  • Loading branch information
jodygarnett authored Sep 28, 2022
1 parent 6bd4864 commit 7fad769
Show file tree
Hide file tree
Showing 40 changed files with 1,725 additions and 46 deletions.
2 changes: 2 additions & 0 deletions build/data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
download
process
216 changes: 216 additions & 0 deletions build/data/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
<project name="data_directory" default="process"
xmlns:if="ant:if" xmlns:unless="ant:unless"
xmlns:resolver="antlib:org.apache.maven.resolver.ant"
>
<!-- macros -->
<macrodef name="download">
<attribute name="download" default="download"/>
<attribute name="file"/>
<attribute name="url"/>
<sequential>
<condition property="@{file}.downloaded">
<available file="@{download}/@{file}"/>
</condition>
<get unless:set="@{file}.downloaded"
skipexisting="true" tryGzipEncoding="true"
src="@{url}"
dest="@{download}/@{file}"/>
</sequential>
</macrodef>

<!-- some common locations -->
<property name="download" location="download"/>
<property name="process" location="process"/>
<property name="data" location="../../data/release/data"/>

<!-- check environment -->
<condition property="download.available">
<available file="${download}"/>
</condition>
<condition property="process.available">
<available file="${process}"/>
</condition>

<property environment="env"/>
<path id="combined-PATH">
<pathelement path="${env.PATH}"/> <!--linux-->
<pathelement path="${env.Path}"/> <!--windows-->
</path>
<property name="PATH" refid="combined-PATH"/>
<condition property="ogr.available">
<or>
<available file="ogr2ogr.exe" filepath="${PATH}"/>
<available file="ogr2ogr" filepath="${PATH}"/>
</or>
</condition>

<!-- clean -->
<target name="clean_download"
description="clean downloads ">
<delete dir="${download}"/>
</target>

<target name="clean"
description="clean processed files">
<delete dir="${process}"/>
</target>

<!-- init -->
<target name="init_download" unless="download.available">
<mkdir dir="${download}"/>
</target>

<target name="init" depends="init_download" unless="process.available">
<mkdir dir="${process}"/>
</target>

<!-- download -->
<target name="download" depends="init_download"
description="Pre-download and prep files">
<parallel threadCount="5">
<antcall target="ne_geopackage_download"/>
</parallel>
</target>

<!-- process -->
<target name="process" depends="download,init"
description="Prep files">
<antcall target="ne_geopackage_process"/>
</target>

<target name="install" depends="process" description="Update release/data with processed data.">
<copy
file="${process}/natural_earth.gpkg" todir="${data}/ne"/>
</target>

<!-- Natural Earth GeoPackage -->
<target name="ne_geopackage_download" depends="init_download">
<download
url="https://naciscdn.org/naturalearth/packages/natural_earth_vector.gpkg.zip"
file="natural_earth_vector.gpkg.zip">
</download>
</target>

<!-- check if custom (processed) geopackage is available -->
<target name="ne_geopackage_check">
<available file="${process}/natural_earth.gpkg" property="gpkg.processed"/>
</target>

<target name="ne_geopackage_process" depends="ne_geopackage_download,ne_geopackage_check" unless="gpkg.processed">
<echo level="info">Unzip into ${download}</echo>
<unzip overwrite="false" src="${download}/natural_earth_vector.gpkg.zip" dest="${download}">
<patternset>
<include name="packages/*"/>
</patternset>
<mapper type="flatten"/>
</unzip>
<echo level="info">Use ogr2ogr create natural_earth.gpkg</echo>
<property name="input" location="${download}/natural_earth_vector.gpkg"/>
<property name="output" location="${process}/natural_earth.gpkg"/>
<property name="options" location="-append -update"/>

<antcall target="-lines">
<param name="table" value="boundary_lines_land"/>
<param name="from" value="ne_110m_admin_0_boundary_lines_land"/>
<param name="select" value = "*"/>
<param name="where" value ="TRUE"/>
<param name="options" value=""/>
<param name="title" value="Boundary Lines"/>
<param name="description" value="Country boundaries on land and offshore."/>
</antcall>

<antcall target="-lines">
<param name="table" value="coastlines"/>
<param name="from" value="ne_110m_coastline"/>
<param name="select" value = "*"/>
<param name="where" value ="TRUE"/>
<param name="options" value="-update"/>
<param name="title" value="Coastlines"/>
<param name="description" value="Ocean coastline, including major islands."/>
</antcall>

<antcall target="-polygons">
<param name="table" value="countries"/>
<param name="from" value="ne_110m_admin_0_countries"/>
<param name="select" value = "*"/>
<param name="where" value ="TRUE"/>
<param name="options" value="-update"/>
<param name="title" value="Countries"/>
<param name="description" value="Sovereign states"/>
</antcall>

<antcall target="-point">
<param name="table" value="populated_places"/>
<param name="from" value="ne_110m_populated_places_simple"/>
<param name="select" value = "*"/>
<param name="where" value ="TRUE"/>
<param name="options" value="-update"/>
<param name="title" value="Populated places"/>
<param name="description" value="City and town points"/>
</antcall>

<!-- roads increases size from 900k to 3.6M -->
<!--antcall target="-lines">
<param name="table" value="roads"/>
<param name="from" value="ne_10m_roads"/>
<param name="select" value = "fid,geom,type,name,label,label2,local,localalt,labelrank,min_zoom,min_label"/>
<param name="where" value ="min_zoom &lt; 6"/>
<param name="options" value="-update"/>
<param name="title" value="Roads"/>
<param name="simplify" value ="0.15"/>
<param name="description" value="Transportation."/>
</antcall-->

</target>

<!-- processing -->
<target name="-lines">
<echo level="info">${title}: ${description}</echo>
<exec executable="ogr2ogr">
<arg line="-f 'GPKG'"/>
<arg path="${output}"/>
<arg path="${input}"/>
<arg line="-lco IDENTIFIER='${title}'"/>
<arg line="-lco DESCRIPTION='${description}'"/>
<arg line="${options}"/>
<arg line="-nlt MULTILINESTRING"/>
<arg line="-nln ${table}"/>
<arg value="-sql"/>
<arg value="SELECT ${select} FROM ${from} WHERE ${where}"/>
<arg line="-simplify ${simplify}" unless:blank="${simplify}"/>
</exec>
</target>

<target name="-polygons">
<echo level="info">${title}: ${description}</echo>
<exec executable="ogr2ogr">
<arg line="-f 'GPKG'"/>
<arg path="${output}"/>
<arg path="${input}"/>
<arg line="-lco OVERWRITE=YES"/>
<arg line="-lco IDENTIFIER='${title}'"/>
<arg line="-lco DESCRIPTION='${description}'"/>
<arg line="${options}"/>
<arg line="-nlt MULTIPOLYGON"/>
<arg line="-nln ${table}"/>
<arg value="-sql"/>
<arg value="SELECT ${select} FROM ${from}"/>
</exec>
</target>
<target name="-point">
<echo level="info">${title}: ${description}</echo>
<exec executable="ogr2ogr">
<arg line="-f 'GPKG'"/>
<arg path="${output}"/>
<arg path="${input}"/>
<arg line="-lco IDENTIFIER='${title}'"/>
<arg line="-lco DESCRIPTION='${description}'"/>
<arg line="${options}"/>
<arg line="-nlt POINT"/>
<arg line="-nln ${table}"/>
<arg value="-sql"/>
<arg value="SELECT ${select} FROM ${from}"/>
</exec>
</target>

</project>
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
release/gwc
release/gwc-gs.xml
release/gwc-layers
release/legendsamples
release/logs
release/security/geoserver.jceks
release/security/masterpw.digest
Expand Down
27 changes: 0 additions & 27 deletions data/release/csw.xml

This file was deleted.

Binary file added data/release/data/ne/natural_earth.gpkg
Binary file not shown.
68 changes: 64 additions & 4 deletions data/release/global.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,48 @@
<id>SettingsInfoImpl-68f6c583:154ca420c47:-8000</id>
<contact>
<addressCity>Alexandria</addressCity>
<addressCountry>Egypt</addressCountry>
<addressCountry>Roman Empire</addressCountry>
<addressState>Egypt</addressState>
<addressType>Work</addressType>
<contactEmail>claudius.ptolomaeus@gmail.com</contactEmail>
<contactOrganization>The Ancient Geographers</contactOrganization>
<contactEmail>claudius.ptolomaeus@mercury.olympus.gov</contactEmail>
<contactOrganization>OSGeo</contactOrganization>
<contactPerson>Claudius Ptolomaeus</contactPerson>
<contactPosition>Chief Geographer</contactPosition>
<onlineResource>https://www.osgeo.org/</onlineResource>
<welcome>Designed for interoperability, GeoServer publishes data from any major spatial data source using open standards.</welcome>
<internationalAddress class="org.geotools.util.GrowableInternationalString"/>
<internationalAddressCity class="org.geotools.util.GrowableInternationalString"/>
<internationalAddressCountry class="org.geotools.util.GrowableInternationalString"/>
<internationalAddressDeliveryPoint class="org.geotools.util.GrowableInternationalString"/>
<internationalAddressPostalCode class="org.geotools.util.GrowableInternationalString"/>
<internationalAddressState class="org.geotools.util.GrowableInternationalString"/>
<internationalAddressType class="org.geotools.util.GrowableInternationalString"/>
<internationalContactEmail class="org.geotools.util.GrowableInternationalString"/>
<internationalContactFacsimile class="org.geotools.util.GrowableInternationalString"/>
<internationalContactOrganization class="org.geotools.util.GrowableInternationalString"/>
<internationalContactPerson class="org.geotools.util.GrowableInternationalString"/>
<internationalContactPosition class="org.geotools.util.GrowableInternationalString"/>
<internationalContactVoice class="org.geotools.util.GrowableInternationalString"/>
<internationalOnlineResource class="org.geotools.util.GrowableInternationalString"/>
<internationalWelcome class="org.geotools.util.GrowableInternationalString"/>
</contact>
<charset>UTF-8</charset>
<numDecimals>8</numDecimals>
<onlineResource>http://geoserver.org</onlineResource>
<verbose>false</verbose>
<verboseExceptions>false</verboseExceptions>
<metadata>
<map>
<entry>
<string>quietOnNotFound</string>
<boolean>false</boolean>
</entry>
</map>
</metadata>
<localWorkspaceIncludesPrefix>false</localWorkspaceIncludesPrefix>
<showCreatedTimeColumnsInAdminList>false</showCreatedTimeColumnsInAdminList>
<showModifiedTimeColumnsInAdminList>false</showModifiedTimeColumnsInAdminList>
<useHeadersProxyURL>false</useHeadersProxyURL>
</settings>
<jai>
<allowInterpolation>false</allowInterpolation>
Expand All @@ -29,6 +58,32 @@
<jpegAcceleration>true</jpegAcceleration>
<allowNativeMosaic>false</allowNativeMosaic>
<allowNativeWarp>false</allowNativeWarp>
<jaiext>
<jaiExtOperations class="sorted-set">
<string>Affine</string>
<string>BandCombine</string>
<string>BandMerge</string>
<string>BandSelect</string>
<string>Binarize</string>
<string>Border</string>
<string>ColorConvert</string>
<string>Crop</string>
<string>ErrorDiffusion</string>
<string>Format</string>
<string>ImageFunction</string>
<string>Lookup</string>
<string>Mosaic</string>
<string>Null</string>
<string>OrderedDither</string>
<string>Rescale</string>
<string>Scale</string>
<string>Stats</string>
<string>Translate</string>
<string>Warp</string>
<string>algebric</string>
<string>operationConst</string>
</jaiExtOperations>
</jaiext>
</jai>
<coverageAccess>
<maxPoolSize>10</maxPoolSize>
Expand All @@ -37,8 +92,13 @@
<queueType>UNBOUNDED</queueType>
<imageIOCacheThreshold>10240</imageIOCacheThreshold>
</coverageAccess>
<updateSequence>152</updateSequence>
<metadata>
<entry key="logRequestsEnabled">false</entry>
</metadata>
<updateSequence>294</updateSequence>
<featureTypeCacheSize>0</featureTypeCacheSize>
<globalServices>true</globalServices>
<xmlPostRequestLogBufferSize>1024</xmlPostRequestLogBufferSize>
<xmlExternalEntitiesEnabled>false</xmlExternalEntitiesEnabled>
<webUIMode>DEFAULT</webUIMode>
</global>
3 changes: 3 additions & 0 deletions data/release/layouts/style-editor-legend.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<layout>
<decoration type="legend" affinity="top,right" offset="0,0" size="auto"/>
</layout>
1 change: 1 addition & 0 deletions data/release/security/layers.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
# roles in the rule
*.*.r=*
*.*.w=ADMIN,GROUP_ADMIN
mode=HIDE
6 changes: 3 additions & 3 deletions data/release/wcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
<enabled>true</enabled>
<name>WCS</name>
<title>Web Coverage Service</title>
<internationalTitle/>
<maintainer>http://geoserver.org/comm</maintainer>
<abstrct>This server implements the WCS specification 1.0 and 1.1.1, it&apos;s reference implementation of WCS 1.1.1. All layers published by this service are available on WMS also.
</abstrct>
<abstrct>This server implements the WCS specification 1.0 and 1.1.1, it&apos;s reference implementation of WCS 1.1.1. All layers published by this service are available on WMS also.</abstrct>
<internationalAbstract/>
<accessConstraints>NONE</accessConstraints>
<fees>NONE</fees>
<versions>
Expand All @@ -21,7 +22,6 @@
</versions>
<keywords>
<string>WCS</string>
<string>WMS</string>
<string>GEOSERVER</string>
</keywords>
<metadataLink>
Expand Down
Loading

0 comments on commit 7fad769

Please sign in to comment.