From 26bf6dde72c3c4a884b06bcf2464fab84e5417dc Mon Sep 17 00:00:00 2001 From: Kevin Neufeld Date: Wed, 6 May 2009 23:20:35 +0000 Subject: [PATCH] Added code that will automatically generate the spatial images used in the documentation from WKT input. git-svn-id: http://svn.osgeo.org/postgis/trunk@4075 b70326c6-7e19-0410-871a-916f4a2858ee --- configure.ac | 2 +- doc/Makefile.in | 7 +- doc/html/image_src/Makefile.in | 64 +++++ doc/html/image_src/generator.c | 355 +++++++++++++++++++++++++++ doc/html/image_src/st_centroid01.svg | 45 ---- doc/html/image_src/st_centroid01.wkt | 2 + doc/html/image_src/st_centroid02.svg | 24 -- doc/html/image_src/st_centroid02.wkt | 2 + doc/html/image_src/st_centroid03.svg | 23 -- doc/html/image_src/st_centroid03.wkt | 2 + doc/html/image_src/st_centroid04.svg | 40 --- doc/html/image_src/st_centroid04.wkt | 2 + doc/html/image_src/st_crosses01.wkt | 2 + doc/html/image_src/st_crosses02.wkt | 2 + doc/html/image_src/st_crosses03.wkt | 2 + doc/html/image_src/st_crosses04.wkt | 2 + doc/html/image_src/st_issimple01.wkt | 1 + doc/html/image_src/st_issimple02.wkt | 1 + doc/html/image_src/st_issimple03.wkt | 1 + doc/html/image_src/st_issimple04.wkt | 1 + doc/html/image_src/st_issimple05.wkt | 1 + doc/html/image_src/st_issimple06.wkt | 1 + doc/html/image_src/st_issimple07.wkt | 1 + doc/html/image_src/st_isvalid01.wkt | 1 + doc/html/image_src/st_isvalid02.wkt | 1 + doc/html/image_src/st_isvalid03.wkt | 1 + doc/html/image_src/st_isvalid04.wkt | 1 + doc/html/image_src/st_isvalid05.wkt | 1 + doc/html/image_src/st_touches01.svg | 43 ---- doc/html/image_src/st_touches02.svg | 23 -- doc/html/image_src/st_touches03.svg | 40 --- doc/html/image_src/st_touches04.svg | 19 -- doc/html/image_src/st_touches05.svg | 19 -- doc/html/image_src/st_touches06.svg | 23 -- 34 files changed, 453 insertions(+), 302 deletions(-) create mode 100644 doc/html/image_src/Makefile.in create mode 100644 doc/html/image_src/generator.c delete mode 100644 doc/html/image_src/st_centroid01.svg create mode 100644 doc/html/image_src/st_centroid01.wkt delete mode 100644 doc/html/image_src/st_centroid02.svg create mode 100644 doc/html/image_src/st_centroid02.wkt delete mode 100644 doc/html/image_src/st_centroid03.svg create mode 100644 doc/html/image_src/st_centroid03.wkt delete mode 100644 doc/html/image_src/st_centroid04.svg create mode 100644 doc/html/image_src/st_centroid04.wkt create mode 100644 doc/html/image_src/st_crosses01.wkt create mode 100644 doc/html/image_src/st_crosses02.wkt create mode 100644 doc/html/image_src/st_crosses03.wkt create mode 100644 doc/html/image_src/st_crosses04.wkt create mode 100644 doc/html/image_src/st_issimple01.wkt create mode 100644 doc/html/image_src/st_issimple02.wkt create mode 100644 doc/html/image_src/st_issimple03.wkt create mode 100644 doc/html/image_src/st_issimple04.wkt create mode 100644 doc/html/image_src/st_issimple05.wkt create mode 100644 doc/html/image_src/st_issimple06.wkt create mode 100644 doc/html/image_src/st_issimple07.wkt create mode 100644 doc/html/image_src/st_isvalid01.wkt create mode 100644 doc/html/image_src/st_isvalid02.wkt create mode 100644 doc/html/image_src/st_isvalid03.wkt create mode 100644 doc/html/image_src/st_isvalid04.wkt create mode 100644 doc/html/image_src/st_isvalid05.wkt delete mode 100644 doc/html/image_src/st_touches01.svg delete mode 100644 doc/html/image_src/st_touches02.svg delete mode 100644 doc/html/image_src/st_touches03.svg delete mode 100644 doc/html/image_src/st_touches04.svg delete mode 100644 doc/html/image_src/st_touches05.svg delete mode 100644 doc/html/image_src/st_touches06.svg diff --git a/configure.ac b/configure.ac index 61e337751..3f2ad0c0f 100644 --- a/configure.ac +++ b/configure.ac @@ -531,7 +531,7 @@ AC_SUBST([SHLIB_LINK]) dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK]) dnl Output the relevant files -AC_OUTPUT([liblwgeom/Makefile liblwgeom/cunit/Makefile postgis/Makefile postgis/sqldefines.h loader/Makefile topology/Makefile regress/Makefile doc/Makefile]) +AC_OUTPUT([liblwgeom/Makefile liblwgeom/cunit/Makefile postgis/Makefile postgis/sqldefines.h loader/Makefile topology/Makefile regress/Makefile doc/Makefile doc/html/image_src/Makefile]) dnl =========================================================================== dnl Display the configuration status information diff --git a/doc/Makefile.in b/doc/Makefile.in index dbb45af0a..30f06fbfb 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -106,9 +106,12 @@ doxygen.cfg: doxygen.cfg.in doxygen: doxygen.cfg doxygen $< +images: + make -C html/image_src + clean: - @rm -f \ - postgis-out.xml + make -C html/image_src clean + @rm -f postgis-out.xml maintainer-clean: clean @rm -f html/*.html \ diff --git a/doc/html/image_src/Makefile.in b/doc/html/image_src/Makefile.in new file mode 100644 index 000000000..0ab59911f --- /dev/null +++ b/doc/html/image_src/Makefile.in @@ -0,0 +1,64 @@ +# ********************************************************************** +# * $Id: Makefile.in +# * +# * PostGIS - Spatial Types for PostgreSQL +# * http://postgis.refractions.net +# * Copyright 2008 Kevin Neufeld +# * +# * This is free software; you can redistribute and/or modify it under +# * the terms of the GNU General Public Licence. See the COPYING file. +# * +# ********************************************************************** + +CC=@CC@ +CFLAGS=@CFLAGS@ @WARNFLAGS@ + +CUNIT_LDFLAGS=@CUNIT_LDFLAGS@ +CUNIT_CPPFLAGS=@CUNIT_CPPFLAGS@ -I../../../liblwgeom + +IMAGES= \ + ../images/st_centroid01.png \ + ../images/st_centroid02.png \ + ../images/st_centroid03.png \ + ../images/st_centroid04.png \ + ../images/st_crosses01.png \ + ../images/st_crosses02.png \ + ../images/st_crosses03.png \ + ../images/st_crosses04.png \ + ../images/st_issimple01.png \ + ../images/st_issimple02.png \ + ../images/st_issimple03.png \ + ../images/st_issimple04.png \ + ../images/st_issimple05.png \ + ../images/st_issimple06.png \ + ../images/st_issimple07.png \ + ../images/st_isvalid01.png \ + ../images/st_isvalid02.png \ + ../images/st_isvalid03.png \ + ../images/st_isvalid04.png \ + ../images/st_isvalid05.png + +OBJS=generator.o + +# Build the generator +all: $(IMAGES) + +# Command to build each of the .o files +$(OBJS): %.o: %.c + $(CC) $(CFLAGS) $(CUNIT_CPPFLAGS) -c -o $@ $< + +# Command to build each of the .wkt files +$(IMAGES): ../images/%.png: %.wkt generator + @./generator $< + +# Build the main unit test executable +generator: ../../../liblwgeom/liblwgeom.a $(OBJS) + $(CC) -o $@ $(OBJS) ../../../liblwgeom/liblwgeom.a -lm $(CUNIT_LDFLAGS) + +# Clean target +clean: + @rm -f $(OBJS) + @rm -f ../images/${IMAGES} + @rm -f generator + @rm -f tmp[0-9].png + diff --git a/doc/html/image_src/generator.c b/doc/html/image_src/generator.c new file mode 100644 index 000000000..188db0ccf --- /dev/null +++ b/doc/html/image_src/generator.c @@ -0,0 +1,355 @@ +/********************************************************************** + * $Id: generator.c 3967 2009-05-04 16:48:11Z kneufeld $ + * + * PostGIS - Spatial Types for PostgreSQL + * http://postgis.refractions.net + * Copyright 2008 Kevin Neufeld + * + * This is free software; you can redistribute and/or modify it under + * the terms of the GNU General Public Licence. See the COPYING file. + * + * This program will generate a .png image for every .wkt file specified + * in this directory's Makefile. Every .wkt file may contain several + * entries of geometries represented as WKT strings. Every line in + * a wkt file is stylized using a predetermined style (line thinkness, + * fill color, etc) currently hard coded in this programs main function. + * + * In order to generate a png file, ImageMagicK must be installed in the + * user's path as system calls are invoked to "convert". In this manner, + * WKT files are converted into SVG syntax and rasterized as png. (PostGIS's + * internal SVG methods could not be used dues to syntax issues with ImageMagick) + * + * The goal of this application is to dynamically generate all the spatial + * pictures used in PostGIS's documentation pages. + * + * Note: the coordinates of the supplied geometries should be within the x-y range + * of 200, otherwise they will appear outside of the generated image. + * + **********************************************************************/ + +#include +#include +#include +#include "CUnit/Basic.h" + +#include "lwalgorithm.h" + +#define SHOW_DIGS_DOUBLE 15 +#define MAX_DOUBLE_PRECISION 15 +#define MAX_DIGS_DOUBLE (SHOW_DIGS_DOUBLE + 2) /* +2 for dot and sign */ + +// Some global styling variables +char *imageSize = "200x200"; + +typedef struct { + int pointSize; + char *pointColor; + + int lineWidth; + char *lineColor; + + char *polygonFillColor; + char *polygonStrokeColor; + int polygonStrokeWidth; +} LAYERSTYLE; + + +/** + * Set up liblwgeom to run in stand-alone mode using the + * usual system memory handling functions. + */ +void lwgeom_init_allocators(void) { + /* liblwgeom callback - install default handlers */ + lwgeom_install_default_allocators(); +} + +/** + * Writes the coordinates of a POINTARRAY to a char* where ordinates are + * separated by a comma and coordinates by a space so that the coordinate + * pairs can be interpreted by ImageMagick's SVG draw command. + * + * @param output a reference to write the POINTARRAY to + * @param pa a reference to a POINTARRAY + * @return the numbers of character written to *output + */ +static size_t +pointarrayToString(char *output, POINTARRAY *pa) { + char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; + char y[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; + int i; + char *ptr = output; + + for ( i=0; i < pa->npoints; i++ ) { + POINT2D pt; + getPoint2d_p(pa, i, &pt); + sprintf(x, "%f", pt.x); + trim_trailing_zeros(x); + sprintf(y, "%f", pt.y); + trim_trailing_zeros(y); + if ( i ) ptr += sprintf(ptr, " "); + ptr += sprintf(ptr, "%s,%s", x, y); + } + + return (ptr - output); +} + +/** + * Serializes a LWPOINT to a char*. This is a helper function that partially + * writes the appropriate draw and fill commands used to generate an SVG image + * using ImageMagick's "convert" command. + + * @param output a char reference to write the LWPOINT to + * @param lwp a reference to a LWPOINT + * @return the numbers of character written to *output + */ +static size_t +drawPoint(char *output, LWPOINT *lwp, LAYERSTYLE style) { + LWDEBUGF( 4, "%s", "enter drawPoint" ); + + char x[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; + char y1[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; + char y2[MAX_DIGS_DOUBLE+MAX_DOUBLE_PRECISION+1]; + char *ptr = output; + POINTARRAY *pa = lwp->point; + POINT2D p; + getPoint2d_p(pa, 0, &p); + + sprintf(x, "%f", p.x); + trim_trailing_zeros(x); + sprintf(y1, "%f", p.y); + trim_trailing_zeros(y1); + sprintf(y2, "%f", p.y + style.pointSize); + trim_trailing_zeros(y2); + + ptr += sprintf(ptr, "-fill %s -strokewidth 5 ", style.pointColor); + ptr += sprintf(ptr, "-draw \"circle %s,%s %s,%s", x, y1, x, y2); + ptr += sprintf(ptr, "'\" "); + + return (ptr - output); +} + +/** + * Serializes a LWLINE to a char*. This is a helper function that partially + * writes the appropriate draw and stroke commands used to generate an SVG image + * using ImageMagick's "convert" command. + + * @param output a char reference to write the LWLINE to + * @param lwl a reference to a LWLINE + * @return the numbers of character written to *output + */ +static size_t +drawLineString(char *output, LWLINE *lwl, LAYERSTYLE style) { + LWDEBUGF( 4, "%s", "enter drawLineString" ); + char *ptr = output; + + ptr += sprintf(ptr, "-fill none -stroke %s -strokewidth %d ", style.lineColor, style.lineWidth); + ptr += sprintf(ptr, "-draw \"stroke-linecap round stroke-linejoin round path 'M "); + ptr += pointarrayToString(ptr, lwl->points ); + ptr += sprintf(ptr, "'\" "); + + return (ptr - output); +} + +/** + * Serializes a LWPOLY to a char*. This is a helper function that partially + * writes the appropriate draw and fill commands used to generate an SVG image + * using ImageMagick's "convert" command. + + * @param output a char reference to write the LWPOLY to + * @param lwp a reference to a LWPOLY + * @return the numbers of character written to *output + */ +static size_t +drawPolygon(char *output, LWPOLY *lwp, LAYERSTYLE style) { + LWDEBUGF( 4, "%s", "enter drawPolygon" ); + + char *ptr = output; + int i; + + ptr += sprintf(ptr, "-fill %s -stroke %s -strokewidth %d ", style.polygonFillColor, style.polygonStrokeColor, style.polygonStrokeWidth ); + ptr += sprintf(ptr, "-draw \"path '"); + for (i=0; inrings; i++) { + ptr += sprintf(ptr, "M "); + ptr += pointarrayToString(ptr, lwp->rings[i] ); + ptr += sprintf(ptr, " "); + } + ptr += sprintf(ptr, "'\" "); + + return (ptr - output); +} + +/** + * Serializes a LWGEOM to a char*. This is a helper function that partially + * writes the appropriate draw, stroke, and fill commands used to generate an + * SVG image using ImageMagick's "convert" command. + + * @param output a char reference to write the LWGEOM to + * @param lwgeom a reference to a LWGEOM + * @return the numbers of character written to *output + */ +static size_t +drawGeometry(char *output, LWGEOM *lwgeom, LAYERSTYLE style ) { + LWDEBUGF( 4, "%s", "enter drawGeometry" ); + char *ptr = output; + int i; + int type = lwgeom_getType(lwgeom->type); + + LWDEBUGF( 4, "switching on %d", type ); + switch(type) { + case POINTTYPE: + ptr += drawPoint(ptr, (LWPOINT*)lwgeom, style ); + break; + case LINETYPE: + ptr += drawLineString(ptr, (LWLINE*)lwgeom, style ); + break; + case POLYGONTYPE: + ptr += drawPolygon(ptr, (LWPOLY*)lwgeom, style ); + break; + case MULTIPOINTTYPE: + case MULTILINETYPE: + case MULTIPOLYGONTYPE: + case COLLECTIONTYPE: + for (i=0; i<((LWCOLLECTION*)lwgeom)->ngeoms; i++) { + ptr += drawGeometry( ptr, lwcollection_getsubgeom ((LWCOLLECTION*)lwgeom, i), style ); + } + break; + } + + return (ptr - output); +} + +/** + * Invokes a system call to ImageMagick's "convert" command that adds a drop + * shadow to the current layer image. + * + * @param layerNumber the current working layer number. + */ +static void +addDropShadow(int layerNumber) { + char str[129]; + sprintf( + str, + "convert tmp%d.png -gravity center \\( +clone -background navy -shadow 100x3+4+4 \\) +swap -background none -flatten tmp%d.png", + layerNumber, layerNumber); + system(str); +} + +/** + * Invokes a system call to ImageMagick's "convert" command that adds a + * highlight to the current layer image. + * + * @param layerNumber the current working layer number. + */ +static void +addHighlight(int layerNumber) { + char str[129]; + sprintf( + str, + "convert tmp%d.png -fx A +matte -blur 1x1 -shade 120x45 -normalize tmp%d.png -compose Overlay -composite tmp%d.png -matte -compose Dst_In -composite tmp%d.png", + layerNumber, layerNumber, layerNumber, layerNumber); + system(str); +} + +/** + * Flattens all the temporary processing png files into a single image + */ +static void +flattenLayers(char* filename) { + char *str; + str = malloc( (48 + strlen(filename) + 1) * sizeof(char) ); + sprintf(str, "convert tmp[0-9].png -background none -flatten %s", filename); + system(str); + system("rm -f tmp[0-9].png"); + free(str); +} + + +/** + * Main Application. Currently, drawing styles are hardcoded in this method. + * Future work may entail reading the styles from a .properties file. + */ +int main( int argc, const char* argv[] ) { + FILE *pfile; + LWGEOM *lwgeom; + char line [2048]; + char *filename; + int layerCount; + int styleNumber; + LAYERSTYLE styles[3]; + + styles[0].pointSize = 6; + styles[0].pointColor = "Blue"; + styles[0].lineWidth = 7; + styles[0].lineColor = "Blue"; + styles[0].polygonFillColor = "Blue"; + styles[0].polygonStrokeColor = "Blue"; + styles[0].polygonStrokeWidth = 1; + + styles[1].pointSize = 6; + styles[1].pointColor = "Green"; + styles[1].lineWidth = 7; + styles[1].lineColor = "Green"; + styles[1].polygonFillColor = "Green"; + styles[1].polygonStrokeColor = "Green"; + styles[1].polygonStrokeWidth = 1; + + styles[2].pointSize = 6; + styles[2].pointColor = "Red"; + styles[2].lineWidth = 7; + styles[2].lineColor = "Red"; + styles[2].polygonFillColor = "Red"; + styles[2].polygonStrokeColor = "Red"; + styles[2].polygonStrokeWidth = 1; + + + if ( argc != 2 ) { + printf("You must specifiy a wkt filename to convert.\n"); + return -1; + } + + if( (pfile = fopen(argv[1], "r")) == NULL){ + perror ( argv[1] ); + return -1; + } + + filename = malloc( (strlen(argv[1])+8) * sizeof(char) ); + strcpy( filename, "../images/" ); + strncat( filename, argv[1], strlen(argv[1])-3 ); + strcat( filename, "png" ); + + printf( "generating %s\n", filename ); + + layerCount = 0; + while ( fgets ( line, sizeof line, pfile ) != NULL ) { + + char output [2048]; + char *ptr = output; + ptr += sprintf( ptr, "convert -size %s xc:none ", imageSize ); + + lwgeom = lwgeom_from_ewkt( line, PARSER_CHECK_NONE ); + LWDEBUGF( 4, "geom = %s", lwgeom_to_ewkt((LWGEOM*)lwgeom,0) ); + + styleNumber = layerCount % 3; + LWDEBUGF( 4, "using style %d", styleNumber ); + ptr += drawGeometry( ptr, lwgeom, styles[styleNumber] ); + LWDEBUGF( 4, "%s", "after drawGeometry" ); + + ptr += sprintf( ptr, "-flip tmp%d.png", layerCount ); + + lwfree( lwgeom ); + + LWDEBUGF( 4, "%s", output ); + system(output); + + addHighlight( layerCount ); + addDropShadow( layerCount ); + layerCount++; + } + + LWDEBUGF(4, "%s", filename); + flattenLayers(filename); + + fclose(pfile); + free(filename); + return 0; +} diff --git a/doc/html/image_src/st_centroid01.svg b/doc/html/image_src/st_centroid01.svg deleted file mode 100644 index 97e8728fc..000000000 --- a/doc/html/image_src/st_centroid01.svg +++ /dev/null @@ -1,45 +0,0 @@ - - - diff --git a/doc/html/image_src/st_centroid01.wkt b/doc/html/image_src/st_centroid01.wkt new file mode 100644 index 000000000..416decee4 --- /dev/null +++ b/doc/html/image_src/st_centroid01.wkt @@ -0,0 +1,2 @@ +MULTIPOINT ( 8 24, 10 92, 12 154, 17 68, 28 10, 29 52, 29 84, 55 50, 56 24, 131 14, 160 180, 189 180 ) +POINT(60.3333333333333 77.6666666666667) \ No newline at end of file diff --git a/doc/html/image_src/st_centroid02.svg b/doc/html/image_src/st_centroid02.svg deleted file mode 100644 index 7edddbbf7..000000000 --- a/doc/html/image_src/st_centroid02.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - diff --git a/doc/html/image_src/st_centroid02.wkt b/doc/html/image_src/st_centroid02.wkt new file mode 100644 index 000000000..223f072be --- /dev/null +++ b/doc/html/image_src/st_centroid02.wkt @@ -0,0 +1,2 @@ +LINESTRING ( 190 160, 10 190, 40 90, 20 70, 10 10, 30 40, 30 10, 110 40, 70 10, 110 10, 140 40, 140 10, 160 30, 180 10 ) +POINT(76.1907245453253 79.8755933886095) \ No newline at end of file diff --git a/doc/html/image_src/st_centroid03.svg b/doc/html/image_src/st_centroid03.svg deleted file mode 100644 index 9f8c2da1d..000000000 --- a/doc/html/image_src/st_centroid03.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/doc/html/image_src/st_centroid03.wkt b/doc/html/image_src/st_centroid03.wkt new file mode 100644 index 000000000..86117c210 --- /dev/null +++ b/doc/html/image_src/st_centroid03.wkt @@ -0,0 +1,2 @@ +POLYGON (( 190 190, 10 190, 10 10, 190 10, 190 20, 160 30, 60 30, 60 130, 190 140, 190 190 )) +POINT(80.2508960573477 113.405017921147) \ No newline at end of file diff --git a/doc/html/image_src/st_centroid04.svg b/doc/html/image_src/st_centroid04.svg deleted file mode 100644 index b84dda69d..000000000 --- a/doc/html/image_src/st_centroid04.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/doc/html/image_src/st_centroid04.wkt b/doc/html/image_src/st_centroid04.wkt new file mode 100644 index 000000000..f324d5d57 --- /dev/null +++ b/doc/html/image_src/st_centroid04.wkt @@ -0,0 +1,2 @@ +GEOMETRYCOLLECTION ( POLYGON (( 190 170, 180 100, 80 140, 80 160, 130 160, 110 180, 110 190, 180 180, 190 170 )), LINESTRING ( 80 120, 120 20, 140 70, 150 30, 180 50, 190 10 ), MULTIPOINT ( 19 150, 22 49, 30 13, 32 101, 45 35, 67 88, 75 16 )) +POINT(143.361344537815 148.263305322129) \ No newline at end of file diff --git a/doc/html/image_src/st_crosses01.wkt b/doc/html/image_src/st_crosses01.wkt new file mode 100644 index 000000000..915598ba2 --- /dev/null +++ b/doc/html/image_src/st_crosses01.wkt @@ -0,0 +1,2 @@ +LINESTRING ( 10 190, 60 80, 130 120, 190 10 ) +MULTIPOINT ( 80 170, 120 13, 130 119, 181 142 ) \ No newline at end of file diff --git a/doc/html/image_src/st_crosses02.wkt b/doc/html/image_src/st_crosses02.wkt new file mode 100644 index 000000000..148e3634c --- /dev/null +++ b/doc/html/image_src/st_crosses02.wkt @@ -0,0 +1,2 @@ +POLYGON (( 10 190, 20 10, 90 20, 110 70, 80 130, 10 190 )) +MULTIPOINT ( 56 60, 94 172, 128 125, 145 44, 172 173 ) \ No newline at end of file diff --git a/doc/html/image_src/st_crosses03.wkt b/doc/html/image_src/st_crosses03.wkt new file mode 100644 index 000000000..69a8c1865 --- /dev/null +++ b/doc/html/image_src/st_crosses03.wkt @@ -0,0 +1,2 @@ +POLYGON (( 10 190, 20 10, 90 20, 110 70, 80 130, 10 190 )) +LINESTRING ( 30 40, 70 50, 120 150, 190 190 ) \ No newline at end of file diff --git a/doc/html/image_src/st_crosses04.wkt b/doc/html/image_src/st_crosses04.wkt new file mode 100644 index 000000000..ef22ee14b --- /dev/null +++ b/doc/html/image_src/st_crosses04.wkt @@ -0,0 +1,2 @@ +LINESTRING ( 10 190, 60 110, 110 120, 190 10 ) +LINESTRING ( 10 10, 70 30, 110 120, 190 190 ) diff --git a/doc/html/image_src/st_issimple01.wkt b/doc/html/image_src/st_issimple01.wkt new file mode 100644 index 000000000..ba1976025 --- /dev/null +++ b/doc/html/image_src/st_issimple01.wkt @@ -0,0 +1 @@ +GEOMETRYCOLLECTION ( LINESTRING ( 10 190, 140 130, 70 80, 190 10 ), POINT(10 190), POINT(190 10) ) diff --git a/doc/html/image_src/st_issimple02.wkt b/doc/html/image_src/st_issimple02.wkt new file mode 100644 index 000000000..b9d6e28c6 --- /dev/null +++ b/doc/html/image_src/st_issimple02.wkt @@ -0,0 +1 @@ +GEOMETRYCOLLECTION ( LINESTRING ( 10 190, 130 40, 170 160, 10 10 ), POINT(10 190), POINT(10 10) ) diff --git a/doc/html/image_src/st_issimple03.wkt b/doc/html/image_src/st_issimple03.wkt new file mode 100644 index 000000000..d6b1be7e3 --- /dev/null +++ b/doc/html/image_src/st_issimple03.wkt @@ -0,0 +1 @@ +GEOMETRYCOLLECTION ( LINESTRING ( 90 190, 120 190, 130 140, 190 50, 70 10, 10 70, 10 150, 90 190 ), POINT(90 190) ) diff --git a/doc/html/image_src/st_issimple04.wkt b/doc/html/image_src/st_issimple04.wkt new file mode 100644 index 000000000..00b8169f7 --- /dev/null +++ b/doc/html/image_src/st_issimple04.wkt @@ -0,0 +1 @@ +GEOMETRYCOLLECTION ( LINESTRING ( 90 190, 120 190, 50 60, 130 10, 190 50, 160 90, 10 150, 90 190 ), POINT(90 190) ) diff --git a/doc/html/image_src/st_issimple05.wkt b/doc/html/image_src/st_issimple05.wkt new file mode 100644 index 000000000..8d68b5d44 --- /dev/null +++ b/doc/html/image_src/st_issimple05.wkt @@ -0,0 +1 @@ +GEOMETRYCOLLECTION ( LINESTRING ( 30 190, 60 60, 170 10 ), LINESTRING ( 100 190, 180 150, 160 70 ), MULTIPOINT ( 30 190, 170 10, 100 190, 160 70 ) ) diff --git a/doc/html/image_src/st_issimple06.wkt b/doc/html/image_src/st_issimple06.wkt new file mode 100644 index 000000000..bf63e2d8e --- /dev/null +++ b/doc/html/image_src/st_issimple06.wkt @@ -0,0 +1 @@ +GEOMETRYCOLLECTION ( LINESTRING ( 30 190, 60 60, 170 10 ), LINESTRING ( 30 190, 180 150, 160 70 ), MULTIPOINT( 170 10, 30 190, 170 10 ) ) diff --git a/doc/html/image_src/st_issimple07.wkt b/doc/html/image_src/st_issimple07.wkt new file mode 100644 index 000000000..2316ab8d7 --- /dev/null +++ b/doc/html/image_src/st_issimple07.wkt @@ -0,0 +1 @@ +GEOMETRYCOLLECTION ( LINESTRING ( 30 190, 60 60, 170 10 ), LINESTRING (100 190, 180 150, 80 10), MULTIPOINT( 30 190, 170 10, 100 190, 80 10 ) ) diff --git a/doc/html/image_src/st_isvalid01.wkt b/doc/html/image_src/st_isvalid01.wkt new file mode 100644 index 000000000..d1a414e38 --- /dev/null +++ b/doc/html/image_src/st_isvalid01.wkt @@ -0,0 +1 @@ +POLYGON ((10 140, 90 190, 130 170, 190 60, 160 10, 50 20, 10 140), (50 100, 70 80, 110 100, 110 140, 50 100)) diff --git a/doc/html/image_src/st_isvalid02.wkt b/doc/html/image_src/st_isvalid02.wkt new file mode 100644 index 000000000..349ebadd8 --- /dev/null +++ b/doc/html/image_src/st_isvalid02.wkt @@ -0,0 +1 @@ +POLYGON ((10 140, 90 190, 130 170, 190 60, 160 10, 50 20, 10 140), (190 60, 140 40, 110 60, 120 90, 190 60)) diff --git a/doc/html/image_src/st_isvalid03.wkt b/doc/html/image_src/st_isvalid03.wkt new file mode 100644 index 000000000..861614190 --- /dev/null +++ b/doc/html/image_src/st_isvalid03.wkt @@ -0,0 +1 @@ +POLYGON ((10 140, 90 190, 130 170, 190 60, 160 10, 50 20, 10 140), (130 170, 10 140, 50 120, 110 110, 130 170)) diff --git a/doc/html/image_src/st_isvalid04.wkt b/doc/html/image_src/st_isvalid04.wkt new file mode 100644 index 000000000..f6ae8a7b7 --- /dev/null +++ b/doc/html/image_src/st_isvalid04.wkt @@ -0,0 +1 @@ +POLYGON ((10 140, 90 190, 130 170, 190 60, 160 10, 50 20, 10 140), (90 189, 10 139, 80 110, 110 130, 90 189)) diff --git a/doc/html/image_src/st_isvalid05.wkt b/doc/html/image_src/st_isvalid05.wkt new file mode 100644 index 000000000..80b93df9b --- /dev/null +++ b/doc/html/image_src/st_isvalid05.wkt @@ -0,0 +1 @@ +POLYGON (( 10 100, 60 140, 60 190, 62 190, 62 157, 130 170, 190 60, 160 10, 50 20, 10 100 )) diff --git a/doc/html/image_src/st_touches01.svg b/doc/html/image_src/st_touches01.svg deleted file mode 100644 index 9fcd0ec14..000000000 --- a/doc/html/image_src/st_touches01.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/doc/html/image_src/st_touches02.svg b/doc/html/image_src/st_touches02.svg deleted file mode 100644 index 4b30221e3..000000000 --- a/doc/html/image_src/st_touches02.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - diff --git a/doc/html/image_src/st_touches03.svg b/doc/html/image_src/st_touches03.svg deleted file mode 100644 index 630e81878..000000000 --- a/doc/html/image_src/st_touches03.svg +++ /dev/null @@ -1,40 +0,0 @@ - - - diff --git a/doc/html/image_src/st_touches04.svg b/doc/html/image_src/st_touches04.svg deleted file mode 100644 index 1571484d5..000000000 --- a/doc/html/image_src/st_touches04.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/doc/html/image_src/st_touches05.svg b/doc/html/image_src/st_touches05.svg deleted file mode 100644 index 7aefedc7a..000000000 --- a/doc/html/image_src/st_touches05.svg +++ /dev/null @@ -1,19 +0,0 @@ - - - diff --git a/doc/html/image_src/st_touches06.svg b/doc/html/image_src/st_touches06.svg deleted file mode 100644 index c51ff648c..000000000 --- a/doc/html/image_src/st_touches06.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - -- 2.49.0