Skip to content

Commit 114fd7e

Browse files
committed
Fix formatting
1 parent 351b971 commit 114fd7e

File tree

1 file changed

+15
-28
lines changed

1 file changed

+15
-28
lines changed

web/docs/developer/index.md

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
# JTS Topology Suite Developer’s Guide
22

3-
### **Version 1.4**
4-
5-
### **Document Change Control**
6-
7-
* REVISION NUMBER: 1.4
8-
* DATE OF ISSUE: October 17, 2003
9-
* AUTHOR(S): Jonathan Aquino
10-
* BRIEF DESCRIPTION OF CHANGE: Initial draft, created for JTS 1.4
11-
12-
# **1. OVERVIEW**
3+
# OVERVIEW
134

145
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.
156

167
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.
178

18-
## **1.1 OTHER RESOURCES**
9+
## RESOURCES
1910

2011
* *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.
2112
* *JTS Technical Specifications*. The design specification for the classes, methods and algorithms implemented in the JTS Topology Suite.
2213
* *JTS JavaDoc*. Documentation for all of the packages, classes and methods in JTS.
2314

24-
# **2. GETTING STARTED**
15+
# GETTING STARTED
2516

2617
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:
2718

@@ -49,7 +40,7 @@ Other computations built into Geometries include: area, envelope, centroid, and
4940
about what a Geometry can do, see the JavaDoc for Geometry in the `org.loctiontech.jts.geom`
5041
package, as well as subsequent sections in this document.
5142

52-
# **3. COMPUTING SPATIAL RELATIONSHIPS**
43+
# COMPUTING SPATIAL RELATIONSHIPS
5344

5445
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:
5546

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

7566
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.
7667

77-
# **4. COMPUTING OVERLAY OPERATIONS**
68+
# COMPUTING OVERLAY OPERATIONS
7869

7970
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.
8071

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

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

103-
# **5. COMPUTING BUFFERS**
94+
# COMPUTING BUFFERS
10495

10596
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**.
10697

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

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

126-
## **5.1 BASIC BUFFERING**
117+
## BASIC BUFFERING
127118

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

@@ -132,7 +123,7 @@ Geometry g = ...
132123
Geometry buffer = g.buffer(100.0);
133124
```
134125

135-
## **5.2 END CAP STYLES**
126+
## END CAP STYLES
136127

137128
Buffer polygons can be computed with different line **end cap
138129
styles**. The end cap style determines how the line work for the buffer
@@ -164,7 +155,7 @@ bufOp.setEndCapStyle(BufferOp.CAP_BUTT);
164155
Geometry buffer = bufOp.getResultGeometry(distance);
165156
```
166157

167-
## **5.3 SPECIFYING THE APPROXIMATION QUANTIZATION**
158+
## SPECIFYING THE APPROXIMATION QUANTIZATION
168159

169160
Since the exact buffer outline of a Geometry usually contains circular
170161
sections, the buffer must be approximated by the linear Geometry
@@ -189,7 +180,7 @@ The default number of segments is 8. This gives less than a 2% maximum error in
189180

190181
**Figure 5-3 \- Using Different Curve Approximation Levels**
191182

192-
# **6. POLYGONIZATION**
183+
# POLYGONIZATION
193184

194185
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.
195186

@@ -232,11 +223,7 @@ Sometimes a spatial operation such as \#union will produce chains of small LineS
232223

233224
**Figure 7-1 – The Line-Merging Operation**
234225

235-
The `LineMerger` assumes that the input `LineStrings` are *noded* (i.e. they do not cross; only their
236-
237-
**TODO** fix this link
238-
239-
endpoints can touch. See *9.1 Noding A Set Of `LineStrings`* on page 11). Note that the output `LineStrings`
226+
The `LineMerger` assumes that the input `LineStrings` are *noded* (i.e. they do not cross; only their endpoints can touch. See *9.1 Noding A Set Of `LineStrings`* on page 11). Note that the output `LineStrings`
240227
are also noded.
241228

242229
If `LineStrings` to be merged do not have the same direction, the direction of the resulting `LineString`
@@ -251,7 +238,7 @@ lineMerger.add(lineStrings);
251238
Collection mergedLineStrings = lineMerger.getMergedLineStrings();
252239
```
253240

254-
# **8. USING CUSTOM COORDINATE SEQUENCES**
241+
# USING CUSTOM COORDINATE SEQUENCES
255242

256243
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.
257244

@@ -273,9 +260,9 @@ A note on performance: If your `CoordinateSequence` is not based on an array of
273260
marshalling and unmarshalling required for JTS to convert the user coordinates into arrays of JTS
274261
coordinates.
275262

276-
# **9. TIPS & TECHNIQUES**
263+
# TIPS & TECHNIQUES
277264

278-
## **9.1 NODING A SET OF LINESTRINGS**
265+
## NODING A SET OF LINESTRINGS
279266

280267
Many spatial operations assume that their input data is **noded**, meaning that `LineStrings` never cross. For
281268
example, the JTS `Polygonizer` and the JTS `LineMerger` described earlier assume that their input is noded.
@@ -301,7 +288,7 @@ for (int i = 1; i \< lineStrings.size(); i++) {
301288
}
302289
```
303290

304-
# **10. UNIONING MANY POLYGONS EFFICIENTLY**
291+
# UNIONING MANY POLYGONS EFFICIENTLY
305292

306293
Calling `Polygon.union` repeatedly is one way to union several `Polygons`
307294
together. But here’s a trick that can be significantly faster (seconds

0 commit comments

Comments
 (0)