content/developer-guide/geometry/index.html (36 lines of code) (raw):
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude" xml:lang="en">
<head>
<title>Geometry</title>
<meta charset="UTF-8"/>
<link rel="stylesheet" type="text/css" href="../book.css"/>
</head>
<body>
<!--
Content below this point is copied in "/asf-staging/book/en/developer-guide.html" file
by the `org.apache.sis.buildtools.book` class in `buildSrc`.
-->
<section>
<header>
<h1 id="Geometry">Geometries</h1>
</header>
<p>
Each geometric object is considered as an infinite set of points
(except the <code>Point</code> object which contains only itself).
To better represent this concept, the <code>TransfiniteSet</code> interface
can be seen as a <code>Set</code> of potentially infinite size in which the elements are points.
All geometries are specializations of <code>TransfiniteSet</code>.
</p><p>
There is two types of structures to represent a point: <code>Point</code> and <code>DirectPosition</code>.
The first type is a true geometry and may therefore be relatively cumbersome, depending on the implementation.
The second type is not formally considered to be a geometry;
it extends neither <code>Geometry</code> nor <code>TransfiniteSet</code>.
It barely defines any operations besides the storing of a sequence of numbers representing a coordinate.
It may therefore be a more lightweight object.
</p><p>
In order to allow the <abbr>API</abbr> to work equally with these two types of positions,
<code>Position</code> is defined as a common interface implemented by <code>DirectPosition</code> and <code>Point</code>.
In practice, the great majority of Apache <abbr>SIS</abbr>’s <abbr>API</abbr> works on <code>DirectPosition</code>s,
and occasionally on <code>Position</code>s when it seems useful to also allow geometric points.
</p>
<xi:include href="Envelope.html"/>
</section>
</body>
</html>