Skip to content

Latest commit

 

History

History
90 lines (75 loc) · 3.38 KB

README.md

File metadata and controls

90 lines (75 loc) · 3.38 KB

H2GIS's website

H2GIS's website is built using Jekyll and Github pages. Consult Jekyll's documentation first, especially the section on YAML front matter. Or if you're really impatient, just take a look at the source of one of the existing pages on the website.

To install Jekyll and serve the website locally, consult GitHub's help page Using Jekyll with Pages.

Contributing

To contribute, fork H2GIS and clone it locally. We will assume your username is user.

~ $ git clone https://github.com/user/h2gis.git

The website is located on the branch gh-pages. So checkout a new branch work which tracks your fork's gh-pages branch.

~ $ cd h2gis
~/h2gis $ git checkout -b work origin/gh-pages

Make changes, commit and push to your fork as usual.

~/h2gis $ git commit -m "Made some changes"
~/h2gis $ git push origin work

When you are ready, submit a pull request from user/work to orbisgis/gh-pages. Your work will be peer-reviewed and accepted when approved.

Style guide

Each function's documentation contains three sections: Signature(s), Description and Example(s).

  1. Global comments:
    1. When refering to geometries in a global sense (and not as WKT), write Geometry or Geometries (and not GEOMETRY). But we still write GEOMETRY in case 1.ii.
    2. WKT geometries should be in UPPERCASE (POLYGON and not Polygon or polygon).
    3. Function names should be written as ST_CompactnessRatio and not st_compactnessratio or ST_COMPACTNESSRATIO.
    4. Put spaces after commas.
  2. Signature(s) - Give all possible function signatures.
    1. Write Signature if there is only one.
    2. Include a semicolon at the end of the signature.
    3. Primitives should be in lowercase (double and not Double or DOUBLE).
    4. Do not skip lines between signatures.
  3. Description and description:
    1. Description - Explain what the function does.
      1. Reference the various variables included in the signature.
      2. Conjugate the verb in third-person singular tense (Rotates and not Rotate).
    2. description: field - Include a short summarizing description in the front-matter description: field.
      1. Do not reference variables.
      2. Do not conjugate the verb (Rotate and not Rotates).
  4. Example(s) - Insert examples in SQL.
    1. Write Example if there is only one.
    2. All SQL keywords should be in UPPERCASE.
    3. SQL variables should be in lowercase.
    4. Insert illustrations as necessary.
    5. Tables may be written in Markdown or SQL comments. If you choose SQL comments, use proper alignment.
    6. Align long geometries vertically by inserting linebreaks as necessary.

Good:

-- Answer: LINESTRING(0.3839745962155607 2.0669872981077813,
--                    2.1160254037844384 1.0669872981077806,
--                    2.6160254037844384 1.933012701892219)

Bad:

-- Answer: LINESTRING(0.3839745962155607 2.0669872981077813, 2.1160254037844384 1.0669872981077806, 2.6160254037844384 1.933012701892219)