[Featureserver] Documentation patch
Christopher Schmidt
crschmidt at metacarta.com
Thu Aug 13 11:07:16 EDT 2009
On Thu, Aug 13, 2009 at 09:57:29AM -0500, Mak Kolybabi wrote:
> This patch is only for files in the doc directory, it contains no changes to code. It
> contains some spelling, grammar, and formatting fixes. I left in the trailing whitespace,
> since many projects have a taboo against patches removing it.
Applied, and updated on the website. Thanks for the patch!
> --
> Mak Kolybabi
> Programmer
> Telenium Inc.
> 204-957-2821
> Index: doc/WindowsOGR.txt
> ===================================================================
> --- doc/WindowsOGR.txt (revision 611)
> +++ doc/WindowsOGR.txt (working copy)
> @@ -1,35 +1,35 @@
> FeatureServer on Windows
> ========================
>
> -You can run FeatureServer under IIS, Apache, or using it's own WSGI based http
> +You can run FeatureServer under IIS, Apache, or using its own WSGI based HTTP
> server. This page outlines how to get it up and running quickly on Windows
> -using the builtin http server and FWTools for supporting OGR dataformats.
> +using the builtin HTTP server and FWTools for supporting OGR dataformats.
>
> * Ensure you downloaded the "full" FeatureServer archive from
> http://featureserver.org. This zipfile should include simplejson, paste,
> - and wsgiref subfolders, amongst others. Unzip this to somewhere (eg
> + and wsgiref subfolders, amongst others. Unzip this to somewhere (e.g.
> c:\temp\featureserver).
>
> * Go to where you unzipped featureserver, and modify featureserver.cfg
> so that the scribble layer points to a valid filename in a folder you have
> - write access to (eg c:/temp/featureserver.scribble). Do not use a single
> - backslash (eg c:\temp) -- use a single forward slash instead in this portion
> + write access to (e.g. c:/temp/featureserver.scribble). Do not use a single
> + backslash (e.g. c:\temp) -- use a single forward slash instead in this portion
> of the file.
>
> -* Actually, you are done now. Assuming you already have python v2.3 or
> +* Actually, you are done now. Assuming you already have Python v2.3 or
> above installed, you can just run the featureserver_http_server.py
>
> -However, assuming you want to use OGR datasources (eg shapefiles, or your
> -SDE instance, etc), then you should install another program - one that lets
> -you import OGR from within python so you can access OGR datasources. An
> +However, assuming you want to use OGR datasources (e.g. shapefiles, or your
> +SDE instance, etc), then you should install another program -- one that lets
> +you import OGR from within Python so you can access OGR datasources. An
> easy one-click install solution on Windows is FWTools.
>
> * Download and install FWTools from http://fwtools.maptools.org.
>
> -* Open a command prompt (start->run->cmd) and set your fwtools environment
> +* Open a command prompt (start->run->cmd) and set your FWTools environment
> variable (run, for example, "C:\Program Files\FWTools2.1.0\setfw.bat").
>
> -* Now have fwtools' python run the basic webserver, eg::
> +* Now have FWTools' Python run the basic webserver, e.g.:
>
> C:\Program Files\FWTools2.0.0\python\python.exe c:\temp\featureserver\featureserver_http_server.py
>
> @@ -39,17 +39,17 @@
> It should say it's now listening on port 8080 (you can choose your
> port with the -p switch. Choose port 80 if you don't have another
> webserver running on that already, and then you can leave the port
> -out of the url you go to)..
> +out of the URL you go to).
>
> * Go check it out in a browser: http://localhost:8080 (or just
> http://localhost if you are running it on port 80)
>
> You should see the list of layers (probably just the scribble layer).
> -Add /scribble to your url to get to it (right now it is probably an
> +Add /scribble to your URL to get to it (right now it is probably an
> empty datasource, so you will get no features returned).
>
> -Read the DataSource in the doc folder and add a new OGR layer (eg
> -shapefile) as they describe, by modifying featureserver.cfg - For example::
> +Read the DataSource in the doc folder and add a new OGR layer (e.g.
> +shapefile) as they describe, by modifying featureserver.cfg - For example:
>
> [cities]
> type=OGR
> @@ -58,7 +58,7 @@
>
> Now, restart the webserver so it reloads the configuration, and send your
> friends to: http://your_computer_name_or_ip/cities?format=kml&maxfeatures=40
> -where cities is the name of the featureserver layer you put in the brackets
> +where cities is the name of the FeatureServer layer you put in the brackets
> in featureserver.cfg
>
> Now it is time to read the other stuff in the doc folder to see what kind of
> Index: doc/Querying.txt
> ===================================================================
> --- doc/Querying.txt (revision 611)
> +++ doc/Querying.txt (working copy)
> @@ -17,9 +17,9 @@
> * only keys in 'queryable' will be queried.
>
> This example demonstrates a query to 'mylayer' which returns a max of 25
> -total features, is spatially limited to somewhere near seattle (assuming
> +total features, is spatially limited to somewhere near Seattle (assuming
> epsg:4326), and ensures all features returned have both 'fun' in their
> -category column, and 'mongoose' in their species column. Note the url
> +category column, and 'mongoose' in their species column. Note the URL
> should be all on one line.
>
> http://myfeatureserver.com/featureserver.cgi/mylayer/all?
> @@ -30,5 +30,5 @@
> &species=mongoose
> &color=brown
>
> -Note that results from the above url will not be filtered by color, since
> +Note that results from the above URL will not be filtered by color, since
> 'color' is not part of the 'queryable' list of keys (see point #5 above).
> Index: doc/Processes.txt
> ===================================================================
> --- doc/Processes.txt (revision 611)
> +++ doc/Processes.txt (working copy)
> @@ -1,11 +1,11 @@
> Processing Data With FeatureServer
> ++++++++++++++++++++++++++++++++++
>
> -Featureserver now has the ability to support processes similar to those
> +FeatureServer now has the ability to support processes similar to those
> performed by a Web Processing Server (WPS) on a FeatureServer datasource.
>
> This allows you to do geospatial operations, such as centroids, buffers,
> -line simplification, and more on your Feature Server data source.
> +line simplification, and more on your FeatureServer data source.
>
> Configuration
> -------------
> @@ -13,23 +13,25 @@
> you create a process configuration in your featureserver.cfg.
>
> Processes are specially named sections in your config: any section of your
> -config which begins with "process\_" will be treated as a process, instead of a
> +config which begins with "process_" will be treated as a process, instead of a
> datasource.
>
> You configure a process in your FeatureServer configuration to perform
> -additional operations; once defined you can use that process on any of your
> +additional operations; once defined, you can use that process on any of your
> datasources.
>
> Example
> =======
>
> -One example of a possible process to configure is a buffer. A buffer is an operation which expands a single geometry outward to contain a data of a certain radius around the original geometry.
> +One example of a possible process to configure is a buffer. A buffer is an
> +operation which expands a single geometry outward to contain a data of a certain
> +radius around the original geometry.
>
> The WebProcessingServer buffer Process has one parameter: called 'buffer',
> this is the amount to expand the geometry by, in map units.
>
> Assuming you have WebProcessingServer installed on your PYTHONPATH, you can
> -specify the Process as follows::
> +specify the Process as follows:
>
> [process_buffer]
> module=WebProcessingServer.Action.OGRGeos
> @@ -44,7 +46,7 @@
> config with a parametername_default option, to define to FeatureServer what
> properties are needed to perform the action.
>
> -The "locked" property states whether the parameter can be overridden: if it
> +The 'locked' property states whether the parameter can be overridden: if it
> is set to 'yes', that means that the parameter can *not* be overridden by
> URL Parameters. If it not set to yes, then a URL parameter, named:
>
> @@ -53,7 +55,7 @@
> or, in this case, process_buffer_buffer, can be used to override the value.
>
> To use this process on a datasource, simply specify it in the 'processes'
> -arg of your DataSource::
> +arg of your DataSource:
>
> [foo_ds]
> type=DBM
> @@ -75,7 +77,9 @@
> In order to allow for maximum configurability, processes can be chained by
> adding multiple comma separated processes to a single data source.
>
> -As an example, in order to get a unified coverage map polygon, you could take the buffer of all data (for a given bounding box), buffer it, then union the result.
> +As an example, in order to get a unified coverage map polygon, you could take
> +the buffer of all data (for a given bounding box), buffer it, then union the
> +result.
>
> Other Use Cases
> ---------------
> @@ -96,7 +100,7 @@
> * list of features
>
> A Feature is an instance of a vectorformats.Feature.Feature object. It has
> -an "id" property, a "properties" property and a "geometry" property which
> +an 'id' property, a 'properties' property and a 'geometry' property which
> contains a GeoJSON-like Geometry object in Python.
>
> You can also include other key/value parameters, which can have defaults, but
> @@ -109,7 +113,7 @@
>
> Filename: foo.py
>
> -Code::
> +Code:
>
> class Foo(object):
> def __call__(self, features, return_nothing=0):
> @@ -117,7 +121,7 @@
> return []
> return features
>
> -Example Configuration::
> +Example Configuration:
>
> [process_foo]
> module=foo
> Index: doc/API.txt
> ===================================================================
> --- doc/API.txt (revision 611)
> +++ doc/API.txt (working copy)
> @@ -24,7 +24,7 @@
>
>
>
> -see whats in there, request the result in format json
> +see what's in there, request the result in format JSON
>
> >>> featureserver.dispatchRequest(path_info="/scribble", params={'format':'geojson'}, base_path= "")
> ('text/plain', '{"crs": null, "type": "FeatureCollection", "features": []}')
> @@ -47,7 +47,7 @@
> ('application/vnd.google-earth.kml+xml', '<?xml version="1.0" encoding="UTF-8"?>\n<kml xmlns="http://earth.google.com/kml/2.0" xmlns:fs="http://featureserver.com/ns" xmlns:atom="http://www.w3.org/2005/Atom">\n<Document>\n<atom:link rel="self" href="/scribble/scribble-data.kml" type="application/vnd.google-earth.kml+xml" /> \n<Style id="allstyle">\n <LineStyle>\n <width>5</width>\n <color>ff0099ee</color>\n </LineStyle>\n <PolyStyle>\n <color>900099ee</color>\n </PolyStyle>\n</Style>\n \n\n <Placemark id="1">\n <name>Feature 3</name>\n <description><![CDATA[Properties:<br /><b>strokeColor</b>: red<br /><b>author</b>: Your Name Here]]></description>\n <styleUrl>#allstyle</styleUrl>\n <atom:link href="/scribble/1.kml" type="edit" />\n <Metadata>\n <fs:strokeColor>red</fs:strokeColor>\n<fs:author>Your Name Here</fs:author>\n </Metadata>\n <Point><coordinates>-92.8125,35.15625</coordinates></Point>\n </Placemark>\n</Document>\n </kml>')
>
>
> -do something with the json
> +do something with the JSON
>
> >>> import simplejson
> >>> format, json = featureserver.dispatchRequest(params={'format':'geojson'}, path_info="/scribble", base_path="")
> Index: doc/DataSources.txt
> ===================================================================
> --- doc/DataSources.txt (revision 611)
> +++ doc/DataSources.txt (working copy)
> @@ -20,7 +20,7 @@
> dsn=/home/example/myshape.shp
> layer=myshape
>
> -Dependancies:
> +Dependencies:
> * OGR
> * ogr Python bindings
>
> @@ -39,7 +39,7 @@
> Depending on the system on which it is running, the internals of this database
> may be different.
>
> -Dependancies:
> +Dependencies:
> * None
>
> DBM Extra Features:
> @@ -52,7 +52,7 @@
> PostGIS
> =======
> The PostGIS datasource implements a direct connection to PostGIS. This
> -datasource requires dsn parameter and a layer parameter. It also accepts a
> +datasource requires a dsn parameter and a layer parameter. It also accepts a
> variety of optional parameters, some of which you may need to override the
> default value of, depending on your schema. Please see the example below
> for details.
> @@ -72,14 +72,14 @@
> attribute_cols=name,some_interesting_column #optional
> order=cost #optional
>
> -Dependancies:
> +Dependencies:
> * psycopg or psycopg2
>
> SQLite
> ======
> A simple sqlite datasource.
>
> -Dependancies:
> +Dependencies:
> * None under Python2.5
> * pysqlite under Python2.4
>
> @@ -99,7 +99,7 @@
> url=http://zuluviz.sdsu.edu:8080/geoserver/wfs
> typename=topp:states
>
> -Dependancies:
> +Dependencies:
> * OGR
> * ogr Python bindings
>
> @@ -111,7 +111,7 @@
>
> http://flickr.com/services/api/flickr.photos.search.html
>
> -For example, a flickr source limited to all photos which match all the
> +For example, a Flickr source limited to all photos which match all the
> tags 'mit', 'food', '2007' from the user with ID '56541240 at N00'::
>
> [flickr]
> @@ -164,14 +164,14 @@
> OSM
> ===
> Allows for requests to hit the OpenStreetMap API to request data. No
> -configuration neccesary. Only supports query-by-bounding-box and query-by-id:
> +configuration necessary. Only supports query-by-bounding-box and query-by-id:
> the latter will only search for 'ways', not nodes or relations. Relations
> are not handled at all.
>
> It is possible to add an 'osmxapi=yes' option. This will use the OSM Extended
> API instead of the main API. This API may be several hours out of date, but
> it does allow attribute queries: see
> -http://wiki.openstreetmap.org/index.php/Osmxapi . It does no support
> +http://wiki.openstreetmap.org/index.php/Osmxapi . It does not support
> ID queries, and if one is sent, it will instead be redirected to the main
> API.
>
> Index: doc/Services.txt
> ===================================================================
> --- doc/Services.txt (revision 611)
> +++ doc/Services.txt (working copy)
> @@ -60,7 +60,7 @@
> ::
>
> callback_value({'data':'here'})
> -* title_property will cause KML/GeoRSS to use the valu you set it to as a key
> +* title_property will cause KML/GeoRSS to use the value you set it to as a key
> for the property which fills the <title> property of the feeds.
> * debug will cause some layers to issue debug information instead of failing
> silently.
> Index: doc/Readme.txt
> ===================================================================
> --- doc/Readme.txt (revision 611)
> +++ doc/Readme.txt (working copy)
> @@ -14,7 +14,7 @@
> DESCRIPTION
> ===========
> FeatureServer is a simple Python-based geographic feature server. It allows
> -you to store geogrpahic vector features in a number of different backends,
> +you to store geographic vector features in a number of different backends,
> and interact with them -- creating, updating, and deleting -- via a
> REST-based API.
>
> @@ -68,7 +68,7 @@
> the simplejson directory from the distribution and put it in the root of your
> FeatureServer install.
>
> -Other dependancies for DataSources and Services are outlined in their
> +Other dependencies for DataSources and Services are outlined in their
> respective documentation files.
>
> Non-standard Python Location
> _______________________________________________
> Featureserver mailing list
> Featureserver at openlayers.org
> http://featureserver.org/mailman/listinfo/featureserver
--
Christopher Schmidt
MetaCarta
More information about the Featureserver
mailing list