Skip to content

Commit ca5eb10

Browse files
committed
Improve Dev guide titles
1 parent 62e3948 commit ca5eb10

File tree

1 file changed

+20
-32
lines changed

1 file changed

+20
-32
lines changed

web/docs/developer/index.md

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
# JTS Topology Suite Developer’s Guide
22

3-
# OVERVIEW
3+
## Overview
44

55
The JTS Topology Suite is a Java API that implements a core set of spatial data operations using an explicit precision model and robust geometric algorithms. It provides a complete model for specifying 2-D linear Geometry. Many common operations in computational geometry and spatial data processing are exposed in a clear, consistent and integrated API. JTS is intended to be used in the development of applications that support the validation, cleaning, integration and querying of spatial datasets.
66

77
This document is intended for developers who would like to use JTS to accomplish their spatial data processing requirements. It describes common uses of the JTS API and gives code examples.
88

9-
## RESOURCES
9+
### Resources
1010

1111
* *OpenGIS Simple Features Specification For SQL Revision 1.1* (referred to as SFS in this document). The reference specification for the spatial data model and the spatial predicates and functions implemented by JTS.
1212
* *JTS Technical Specifications*. The design specification for the classes, methods and algorithms implemented in the JTS Topology Suite.
1313
* *JTS JavaDoc*. Documentation for all of the packages, classes and methods in JTS.
1414

15-
# GETTING STARTED
15+
## Getting Started
1616

17-
The most common JTS tasks involve creating and using Geometry objects. The easiest way to create a Geometry by hand is to use a WKTReader to generate one from a Well-Known Text (WKT) string. For example:
17+
The most common JTS tasks involve creating and using `Geometry` objects. The easiest way to create a `Geometry` by hand is to use a `WKTReader` to generate one from a Well-Known Text (WKT) string. For example:
1818

1919
```java
2020
Geometry g1 = new WKTReader().read("LINESTRING (0 0, 10 10, 20 20)");
2121
```
2222

23-
A precise specification for WKT is given in the *JTS Technical Specifications*. And many examples of WKT may be found in the files in the *test* directory.
23+
A specification for WKT is given in the *JTS Technical Specifications*. Many examples of WKT may be found in the files in the *test* directory.
2424

25-
In a real program, it’s easier to use a GeometryFactory, because you don’t need to build up a WKT string; rather, you work with the objects directly:
25+
In a real program, it’s better to use a `GeometryFactory`, because you don’t need to build up a WKT string; rather, you work with the objects directly:
2626

2727
```java
2828
Coordinate[] coordinates = new Coordinate[] {
2929
new Coordinate(0, 0), new Coordinate(10, 10), new Coordinate(20, 20) };
3030
Geometry g1 = new GeometryFactory().createLineString(coordinates);
3131
```
3232

33-
Once you’ve made your Geometry, there are many things you can do with it. You can easily find the intersection of two Geometries:
33+
Once you’ve made a Geometry, there are many things you can do with it. You can easily find the intersection of two geometries:
3434

3535
```java
3636
Geometry g3 = g1.intersection(g2);
@@ -40,7 +40,7 @@ Other computations built into Geometries include: area, envelope, centroid, and
4040
about what a Geometry can do, see the JavaDoc for Geometry in the `org.loctiontech.jts.geom`
4141
package, as well as subsequent sections in this document.
4242

43-
# COMPUTING SPATIAL RELATIONSHIPS
43+
## Spatial Relationships
4444

4545
An important application of JTS is computing the spatial relationships between Geometries. Various methods of computing relationships are provided. JTS follows the **Dimensionally Extended 9 Intersection Matrix** model specified by the OGC. To compute the DE-9IM for two Geometries, use the relate method:
4646

@@ -65,7 +65,7 @@ Most relationships of interest can be specified as a pattern which matches a set
6565

6666
In some cases the precise definition of the predicates is subtle. You should refer to the JTS Technical Specifications to determine exactly what will be returned in any given case.
6767

68-
# COMPUTING OVERLAY OPERATIONS
68+
## Overlay Operations
6969

7070
The previous section discussed functions that return true or false, like Intersects and Contains. We will now present the JTS **overlay operations**, some of which are illustrated in Figure 4-1 below.
7171

@@ -91,7 +91,7 @@ Descriptions for the overlay operations are tabulated below.
9191

9292
As with the spatial relationships described in the previous section, these overlay operations have precise definitions given in the JTS Technical Specifications.
9393

94-
# COMPUTING BUFFERS
94+
## Buffering
9595

9696
In GIS, buffering is an operation which in GIS is used to compute the area containing all points within a given distance of a Geometry. In mathematical terms, this is called computing the **Minkowski sum** of the Geometry with a disc of radius equal to the buffer distance. Finding positive and negative buffers is sometimes referred to as the operations of **erosion** and **dilation**. In CAD/CAM buffer curves are called **offset curves**.
9797

@@ -114,7 +114,7 @@ or a `Point` results in an empty `Geometry`.
114114

115115
Buffer distances of 0 are also supported. You can use this to perform an efficient union of multiple polygons.
116116

117-
## BASIC BUFFERING
117+
### Basic Buffers
118118

119119
To compute a buffer for a given distance, call the `buffer()` method on the `Geometry`:
120120

@@ -123,7 +123,7 @@ Geometry g = ...
123123
Geometry buffer = g.buffer(100.0);
124124
```
125125

126-
## END CAP STYLES
126+
### End Cap Styles
127127

128128
Buffer polygons can be computed with different line **end cap
129129
styles**. The end cap style determines how the line work for the buffer
@@ -155,10 +155,10 @@ bufOp.setEndCapStyle(BufferOp.CAP_BUTT);
155155
Geometry buffer = bufOp.getResultGeometry(distance);
156156
```
157157

158-
## SPECIFYING THE APPROXIMATION QUANTIZATION
158+
### Quantization Approximation
159159

160160
Since the exact buffer outline of a Geometry usually contains circular
161-
sections, the buffer must be approximated by the linear Geometry
161+
sections, the buffer must be approximated by the linear Geometry
162162
supported by JTS. The degree of approximation may be controlled by the
163163
user. In JTS this is done by specifying the number of quadrant segments
164164
used to approximate a quarter-circle. Specifying a larger number of
@@ -180,7 +180,7 @@ The default number of segments is 8. This gives less than a 2% maximum error in
180180

181181
**Figure 5-3 \- Using Different Curve Approximation Levels**
182182

183-
# POLYGONIZATION
183+
## Polygonization
184184

185185
Polygonization is the process of forming polygons from linework which encloses areas. Linework to be formed into polygons must be fully noded – that is, linestrings must not cross and must touch only at endpoints.
186186

@@ -213,7 +213,7 @@ If the set of lines is not correctly noded the Polygonizer will still operate on
213213

214214
**Figure 6-1 \- The Polygonization Operation**
215215

216-
# **7. MERGING A SET OF LINESTRINGS**
216+
## Merging Lines
217217

218218
Sometimes a spatial operation such as \#union will produce chains of small LineStrings. The JTS LineMerger is a simple utility to sew these small LineStrings together, as shown below.
219219

@@ -238,7 +238,7 @@ lineMerger.add(lineStrings);
238238
Collection mergedLineStrings = lineMerger.getMergedLineStrings();
239239
```
240240

241-
# USING CUSTOM COORDINATE SEQUENCES
241+
## Custom Coordinate Sequences
242242

243243
By default JTS uses arrays of Coordinates to represent the points and lines of Geometries. There are some cases in which you might want Geometries to store their points using some other implementation. For example, to save memory you may want to use a more compact sequence implementation, such as an array of x’s and an array of y’s. Another possibility is to use a custom coordinate class to store extra information on each coordinate, such as measures for linear referencing.
244244

@@ -260,11 +260,11 @@ A note on performance: If your `CoordinateSequence` is not based on an array of
260260
marshalling and unmarshalling required for JTS to convert the user coordinates into arrays of JTS
261261
coordinates.
262262

263-
# TIPS & TECHNIQUES
263+
## Tips & Techniques
264264

265-
## NODING A SET OF LINESTRINGS
265+
### Noding Lines
266266

267-
Many spatial operations assume that their input data is **noded**, meaning that `LineStrings` never cross. For
267+
Many spatial operations expect that their input data is **noded**, meaning that `LineStrings` never cross. For
268268
example, the JTS `Polygonizer` and the JTS `LineMerger` described earlier assume that their input is noded.
269269

270270
The noding process splits `LineStrings` that cross into smaller `LineStrings` that meet at a point, or
@@ -288,16 +288,4 @@ for (int i = 1; i \< lineStrings.size(); i++) {
288288
}
289289
```
290290

291-
# UNIONING MANY POLYGONS EFFICIENTLY
292291

293-
Calling `Polygon.union` repeatedly is one way to union several `Polygons`
294-
together. But here’s a trick that can be significantly faster (seconds
295-
rather than minutes) – add the `Polygons` to a `GeometryCollection`,
296-
then apply a buffer with zero distance:
297-
298-
```java
299-
Polygon[] polygons = ...
300-
GeometryCollection polygonCollection =
301-
geometryFactory.createGeometryCollection(polygons);
302-
Geometry union = polygonCollection.buffer(0);
303-
```

0 commit comments

Comments
 (0)